I am trying to use Shoulda matchers with the latest beta version of RSpec for Rails 3. I''ve managed to track down the cause of my errors to needing to explicitly set the subject, but the Shoulda examples make no mention of requiring this step. I''ve pastied the errors I''m receiving and adding subject { controller } seems to resolve them. Is this behavior expected? http://pastie.org/1020788 Thanks
On Jun 30, 2010, at 12:00 PM, ericindc wrote:> I am trying to use Shoulda matchers with the latest beta version of > RSpec for Rails 3. I''ve managed to track down the cause of my errors > to needing to explicitly set the subject, but the Shoulda examples > make no mention of requiring this step. I''ve pastied the errors I''m > receiving and adding subject { controller } seems to resolve them. Is > this behavior expected? > > http://pastie.org/1020788Have you tried pinging the shoulda maintainers?
I have a thread open on their group page as well, but the only response received thus far seems to think it''s an RSpec issue. I am having the same issue in my model tests as well. On Jul 1, 3:23?pm, David Chelimsky <dchelim... at gmail.com> wrote:> On Jun 30, 2010, at 12:00 PM, ericindc wrote: > > > I am trying to use Shoulda matchers with the latest beta version of > > RSpec for Rails 3. ?I''ve managed to track down the cause of my errors > > to needing to explicitly set the subject, but the Shoulda examples > > make no mention of requiring this step. ?I''ve pastied the errors I''m > > receiving and adding subject { controller } seems to resolve them. ?Is > > this behavior expected? > > >http://pastie.org/1020788 > > Have you tried pinging the shoulda maintainers? > _______________________________________________ > rspec-users mailing list > rspec-us... at rubyforge.orghttp://rubyforge.org/mailman/listinfo/rspec-users
On Jul 1, 2010, at 8:40 PM, ericindc wrote:> On Jul 1, 3:23 pm, David Chelimsky <dchelim... at gmail.com> wrote: >> On Jun 30, 2010, at 12:00 PM, ericindc wrote: >> >>> I am trying to use Shoulda matchers with the latest beta version of >>> RSpec for Rails 3. I''ve managed to track down the cause of my errors >>> to needing to explicitly set the subject, but the Shoulda examples >>> make no mention of requiring this step. I''ve pastied the errors I''m >>> receiving and adding subject { controller } seems to resolve them. Is >>> this behavior expected? >> >>> http://pastie.org/1020788 >> >> Have you tried pinging the shoulda maintainers? > > I have a thread open on their group page as well, but the only > response received thus far seems to think it''s an RSpec issue.Link?> I am having the same issue in my model tests as well.ps - please bottom and/or inline post. Read http://idallen.com/topposting.html for more info.
http://groups.google.com/group/shoulda/browse_thread/thread/9a19ca5f60285e2d On Jul 1, 9:47?pm, David Chelimsky <dchelim... at gmail.com> wrote:> On Jul 1, 2010, at 8:40 PM, ericindc wrote: > > > > > > > On Jul 1, 3:23 pm, David Chelimsky <dchelim... at gmail.com> wrote: > >> On Jun 30, 2010, at 12:00 PM, ericindc wrote: > > >>> I am trying to use Shoulda matchers with the latest beta version of > >>> RSpec for Rails 3. ?I''ve managed to track down the cause of my errors > >>> to needing to explicitly set the subject, but the Shoulda examples > >>> make no mention of requiring this step. ?I''ve pastied the errors I''m > >>> receiving and adding subject { controller } seems to resolve them. ?Is > >>> this behavior expected? > > >>>http://pastie.org/1020788 > > >> Have you tried pinging the shoulda maintainers? > > > I have a thread open on their group page as well, but the only > > response received thus far seems to think it''s an RSpec issue. > > Link? > > > I am having the same issue in my model tests as well. > > ps - please bottom and/or inline post. Readhttp://idallen.com/topposting.htmlfor more info. > > _______________________________________________ > rspec-users mailing list > rspec-us... at rubyforge.orghttp://rubyforge.org/mailman/listinfo/rspec-users
On Jul 1, 2010, at 9:01 PM, ericindc wrote:> On Jul 1, 9:47 pm, David Chelimsky <dchelim... at gmail.com> wrote: >> On Jul 1, 2010, at 8:40 PM, ericindc wrote: >>> On Jul 1, 3:23 pm, David Chelimsky <dchelim... at gmail.com> wrote: >>>> On Jun 30, 2010, at 12:00 PM, ericindc wrote: >> >>>>> I am trying to use Shoulda matchers with the latest beta version of >>>>> RSpec for Rails 3. I''ve managed to track down the cause of my errors >>>>> to needing to explicitly set the subject, but the Shoulda examples >>>>> make no mention of requiring this step. I''ve pastied the errors I''m >>>>> receiving and adding subject { controller } seems to resolve them. Is >>>>> this behavior expected? >> >>>>> http://pastie.org/1020788 >> >>>> Have you tried pinging the shoulda maintainers? >> >>> I have a thread open on their group page as well, but the only >>> response received thus far seems to think it''s an RSpec issue. >> >> Link? >> >>> I am having the same issue in my model tests as well. >> >> ps - please bottom and/or inline post. Readhttp://idallen.com/topposting.htmlfor more info.> http://groups.google.com/group/shoulda/browse_thread/thread/9a19ca5f60285e2dCan you show me the version of your code (with the subject workaround) that works?
Here is the full controller spec that is passing...removing the subject line fails all bu the render_template. require ''spec_helper'' describe HomepageController do describe "routes" do it { should route(:get, "/").to(:action => :index) } end describe "on GET to :index" do before(:each) do get :index end subject { controller } it { should respond_with(:success) } it { should render_template(:index) } it { should_not set_the_flash } end end On Jul 1, 10:32?pm, David Chelimsky <dchelim... at gmail.com> wrote:> On Jul 1, 2010, at 9:01 PM, ericindc wrote: > > > > > > > On Jul 1, 9:47 pm, David Chelimsky <dchelim... at gmail.com> wrote: > >> On Jul 1, 2010, at 8:40 PM, ericindc wrote: > >>> On Jul 1, 3:23 pm, David Chelimsky <dchelim... at gmail.com> wrote: > >>>> On Jun 30, 2010, at 12:00 PM, ericindc wrote: > > >>>>> I am trying to use Shoulda matchers with the latest beta version of > >>>>> RSpec for Rails 3. ?I''ve managed to track down the cause of my errors > >>>>> to needing to explicitly set the subject, but the Shoulda examples > >>>>> make no mention of requiring this step. ?I''ve pastied the errors I''m > >>>>> receiving and adding subject { controller } seems to resolve them. ?Is > >>>>> this behavior expected? > > >>>>>http://pastie.org/1020788 > > >>>> Have you tried pinging the shoulda maintainers? > > >>> I have a thread open on their group page as well, but the only > >>> response received thus far seems to think it''s an RSpec issue. > > >> Link? > > >>> I am having the same issue in my model tests as well. > > >> ps - please bottom and/or inline post. Readhttp://idallen.com/topposting.htmlformore info. > >http://groups.google.com/group/shoulda/browse_thread/thread/9a19ca5f6... > > Can you show me the version of your code (with the subject workaround) that works? > _______________________________________________ > rspec-users mailing list > rspec-us... at rubyforge.orghttp://rubyforge.org/mailman/listinfo/rspec-users
On Jul 1, 2010, at 9:35 PM, ericindc wrote:> > > On Jul 1, 10:32 pm, David Chelimsky <dchelim... at gmail.com> wrote: >> On Jul 1, 2010, at 9:01 PM, ericindc wrote: >> >> >> >> >> >>> On Jul 1, 9:47 pm, David Chelimsky <dchelim... at gmail.com> wrote: >>>> On Jul 1, 2010, at 8:40 PM, ericindc wrote: >>>>> On Jul 1, 3:23 pm, David Chelimsky <dchelim... at gmail.com> wrote: >>>>>> On Jun 30, 2010, at 12:00 PM, ericindc wrote: >> >>>>>>> I am trying to use Shoulda matchers with the latest beta version of >>>>>>> RSpec for Rails 3. I''ve managed to track down the cause of my errors >>>>>>> to needing to explicitly set the subject, but the Shoulda examples >>>>>>> make no mention of requiring this step. I''ve pastied the errors I''m >>>>>>> receiving and adding subject { controller } seems to resolve them. Is >>>>>>> this behavior expected? >> >>>>>>> http://pastie.org/1020788 >> >>>>>> Have you tried pinging the shoulda maintainers? >> >>>>> I have a thread open on their group page as well, but the only >>>>> response received thus far seems to think it''s an RSpec issue. >> >>>> Link? >> >>>>> I am having the same issue in my model tests as well. >> >>>> ps - please bottom and/or inline post. Readhttp://idallen.com/topposting.htmlformore info. >>> http://groups.google.com/group/shoulda/browse_thread/thread/9a19ca5f6... >> >> Can you show me the version of your code (with the subject workaround) that works?> Here is the full controller spec that is passing...removing the > subject line fails all bu the render_template. > > require ''spec_helper'' > > describe HomepageController do > > describe "routes" do > it { should route(:get, "/").to(:action => :index) } > end > > > describe "on GET to :index" do > before(:each) do > get :index > end > > subject { controller } > > it { should respond_with(:success) } > it { should render_template(:index) } > it { should_not set_the_flash } > end > > endIt''s a shoulda issue, which I''ve raised (including a patch) in the shoulda tracker: http://github.com/thoughtbot/shoulda/issues/issue/112 Please feel free to follow and comment on that issue. Cheers, David
Will do, thanks! On Jul 1, 11:10?pm, David Chelimsky <dchelim... at gmail.com> wrote:> On Jul 1, 2010, at 9:35 PM, ericindc wrote: > > > > > > > > > On Jul 1, 10:32 pm, David Chelimsky <dchelim... at gmail.com> wrote: > >> On Jul 1, 2010, at 9:01 PM, ericindc wrote: > > >>> On Jul 1, 9:47 pm, David Chelimsky <dchelim... at gmail.com> wrote: > >>>> On Jul 1, 2010, at 8:40 PM, ericindc wrote: > >>>>> On Jul 1, 3:23 pm, David Chelimsky <dchelim... at gmail.com> wrote: > >>>>>> On Jun 30, 2010, at 12:00 PM, ericindc wrote: > > >>>>>>> I am trying to use Shoulda matchers with the latest beta version of > >>>>>>> RSpec for Rails 3. ?I''ve managed to track down the cause of my errors > >>>>>>> to needing to explicitly set the subject, but the Shoulda examples > >>>>>>> make no mention of requiring this step. ?I''ve pastied the errors I''m > >>>>>>> receiving and adding subject { controller } seems to resolve them. ?Is > >>>>>>> this behavior expected? > > >>>>>>>http://pastie.org/1020788 > > >>>>>> Have you tried pinging the shoulda maintainers? > > >>>>> I have a thread open on their group page as well, but the only > >>>>> response received thus far seems to think it''s an RSpec issue. > > >>>> Link? > > >>>>> I am having the same issue in my model tests as well. > > >>>> ps - please bottom and/or inline post. Readhttp://idallen.com/topposting.htmlformoreinfo. > >>>http://groups.google.com/group/shoulda/browse_thread/thread/9a19ca5f6... > > >> Can you show me the version of your code (with the subject workaround) that works? > > Here is the full controller spec that is passing...removing the > > subject line fails all bu the render_template. > > > require ''spec_helper'' > > > describe HomepageController do > > > ?describe "routes" do > > ? ?it { should route(:get, "/").to(:action => :index) } > > ?end > > > ?describe "on GET to :index" do > > ? ?before(:each) do > > ? ? ?get :index > > ? ?end > > > ? ?subject { controller } > > > ? ?it { should respond_with(:success) } > > ? ?it { should render_template(:index) } > > ? ?it { should_not set_the_flash } > > ?end > > > end > > It''s a shoulda issue, which I''ve raised (including a patch) in the shoulda tracker:http://github.com/thoughtbot/shoulda/issues/issue/112 > > Please feel free to follow and comment on that issue. > > Cheers, > David > _______________________________________________ > rspec-users mailing list > rspec-us... at rubyforge.orghttp://rubyforge.org/mailman/listinfo/rspec-users
On Jul 1, 2010, at 10:32 PM, ericindc wrote:> On Jul 1, 11:10 pm, David Chelimsky <dchelim... at gmail.com> wrote: >> On Jul 1, 2010, at 9:35 PM, ericindc wrote: >>> On Jul 1, 10:32 pm, David Chelimsky <dchelim... at gmail.com> wrote: >>>> On Jul 1, 2010, at 9:01 PM, ericindc wrote: >>>>> On Jul 1, 9:47 pm, David Chelimsky <dchelim... at gmail.com> wrote: >>>>>> On Jul 1, 2010, at 8:40 PM, ericindc wrote: >>>>>>> On Jul 1, 3:23 pm, David Chelimsky <dchelim... at gmail.com> wrote: >>>>>>>> On Jun 30, 2010, at 12:00 PM, ericindc wrote: >> >>>>>>>>> I am trying to use Shoulda matchers with the latest beta version of >>>>>>>>> RSpec for Rails 3. I''ve managed to track down the cause of my errors >>>>>>>>> to needing to explicitly set the subject, but the Shoulda examples >>>>>>>>> make no mention of requiring this step. I''ve pastied the errors I''m >>>>>>>>> receiving and adding subject { controller } seems to resolve them. Is >>>>>>>>> this behavior expected? >> >>>>>>>>> http://pastie.org/1020788 >> >>>>>>>> Have you tried pinging the shoulda maintainers? >> >>>>>>> I have a thread open on their group page as well, but the only >>>>>>> response received thus far seems to think it''s an RSpec issue. >> >>>>>> Link? >> >>>>>>> I am having the same issue in my model tests as well. >> >>>>>> ps - please bottom and/or inline post. Readhttp://idallen.com/topposting.htmlformoreinfo. >>>>> http://groups.google.com/group/shoulda/browse_thread/thread/9a19ca5f6... >> >>>> Can you show me the version of your code (with the subject workaround) that works? >>> Here is the full controller spec that is passing...removing the >>> subject line fails all bu the render_template. >> >>> require ''spec_helper'' >> >>> describe HomepageController do >> >>> describe "routes" do >>> it { should route(:get, "/").to(:action => :index) } >>> end >> >>> describe "on GET to :index" do >>> before(:each) do >>> get :index >>> end >> >>> subject { controller } >> >>> it { should respond_with(:success) } >>> it { should render_template(:index) } >>> it { should_not set_the_flash } >>> end >> >>> end >> >> It''s a shoulda issue, which I''ve raised (including a patch) in the shoulda tracker:http://github.com/thoughtbot/shoulda/issues/issue/112 >> >> Please feel free to follow and comment on that issue.> Will do, thanks!And please, please, please stop top-posting! http://idallen.com/topposting.html Cheers, David