Mikkel Refsgaard Bech
2009-May-02 20:04 UTC
camping-test error: undefined method `fixtures''
Hi Trying to use camping-test with my camping app but I get an error: undefined method `fixtures'' The error can be reproduced by using this empty app (your_app.rb): require ''camping'' Camping.goes :YourApp module Steps module Models end module Controllers end module Views end end And running the test from camping-test: http://github.com/judofyr/camping-test/tree/master I just run: # ruby test_your_app.rb test_your_app.rb:7: undefined method `fixtures'' for YourApp::Tests::TestSomeBasicStuff:Class (NoMethodError) camping-1.9.300 activesupport-2.3.2 activerecord-2.3.2 camping-test Is anyone using this successfully? Regards, Mikkel
Oh, didn''t know anyone was actually using this :-) It''s because Rails no longer include the fixture-model into Test::Unit::TestCase, but rather into a subclass. I''ll see if I can fix it... //Magnus Den 2. mai. 2009 kl. 22.04 skrev Mikkel Refsgaard Bech <mikkel at refsgaardbech.dk >:> Hi > > Trying to use camping-test with my camping app but I get an error: > undefined method `fixtures'' > > The error can be reproduced by using this empty app (your_app.rb): > > require ''camping'' > Camping.goes :YourApp > module Steps > module Models > end > module Controllers > end > module Views > end > end > > And running the test from camping-test: > http://github.com/judofyr/camping-test/tree/master > > I just run: > # ruby test_your_app.rb > test_your_app.rb:7: undefined method `fixtures'' for > YourApp::Tests::TestSomeBasicStuff:Class (NoMethodError) > > camping-1.9.300 > activesupport-2.3.2 > activerecord-2.3.2 > camping-test > > Is anyone using this successfully? > > Regards, > Mikkel > > _______________________________________________ > Camping-list mailing list > Camping-list at rubyforge.org > http://rubyforge.org/mailman/listinfo/camping-list
I''ve pushed out a fix now. Could you verify it? //Magnus Holm On Sat, May 2, 2009 at 22:04, Mikkel Refsgaard Bech <mikkel at refsgaardbech.dk> wrote:> Hi > > Trying to use camping-test with my camping app but I get an error: > undefined method `fixtures'' > > The error can be reproduced by using this empty app (your_app.rb): > > require ''camping'' > Camping.goes :YourApp > module Steps > module Models > end > module Controllers > end > module Views > end > end > > And running the test from camping-test: > http://github.com/judofyr/camping-test/tree/master > > I just run: > # ruby test_your_app.rb > test_your_app.rb:7: undefined method `fixtures'' for > YourApp::Tests::TestSomeBasicStuff:Class (NoMethodError) > > camping-1.9.300 > activesupport-2.3.2 > activerecord-2.3.2 > camping-test > > Is anyone using this successfully? > > Regards, > Mikkel > > _______________________________________________ > Camping-list mailing list > Camping-list at rubyforge.org > http://rubyforge.org/mailman/listinfo/camping-list >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/camping-list/attachments/20090503/dece8d70/attachment.html>
Mikkel Refsgaard Bech
2009-May-05 20:40 UTC
camping-test error: undefined method `fixtures''
On 03/05/2009, at 21.34, Magnus Holm wrote:> I''ve pushed out a fix now. Could you verify it?Works fine, thank you. Any reason for not using the :memory: database any longer? Regards, Mikkel
Oh crap. Did that get commited? I was just testing if the memory-database had anything to do with it and forgot to change it back later. Pushing a "fix" tomorrow :-) //Magnus Holm On Tue, May 5, 2009 at 22:40, Mikkel Refsgaard Bech <mikkel at refsgaardbech.dk> wrote:> On 03/05/2009, at 21.34, Magnus Holm wrote: > > I''ve pushed out a fix now. Could you verify it? >> > > Works fine, thank you. > > Any reason for not using the :memory: database any longer? > > > Regards, > Mikkel > > _______________________________________________ > Camping-list mailing list > Camping-list at rubyforge.org > http://rubyforge.org/mailman/listinfo/camping-list >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/camping-list/attachments/20090505/8c737580/attachment.html>
That sounds like a good idea. I''ve figured out one way to do cookies, but still need to find a way to handle sessions. Pushing later when I''ve come up with something :-) //Magnus Holm On Wed, May 6, 2009 at 22:28, Mikkel Refsgaard Bech <mikkel at refsgaardbech.dk> wrote:> > On 05/05/2009, at 22.49, Magnus Holm wrote: > > Oh crap. Did that get commited? I was just testing if the memory-database > had anything to do with it and forgot to change it back later. Pushing a > "fix" tomorrow :-) > > > Sweet. > > One other thing, I can''t figure out how to input some @state before I call > get/post/etc... I need to test my app while I''m logged in, which just means > that some user ID is set in @state, is that possible? > > E.g.: > > test "i can get my secret page when I am logged id" do > @state.user_id = 1 > get ''/secretpage'' > assert_response :ok > end > > Thanks, > Mikkel > > > > //Magnus Holm > > > On Tue, May 5, 2009 at 22:40, Mikkel Refsgaard Bech < > mikkel at refsgaardbech.dk> wrote: > >> On 03/05/2009, at 21.34, Magnus Holm wrote: >> >> I''ve pushed out a fix now. Could you verify it? >>> >> >> Works fine, thank you. >> >> Any reason for not using the :memory: database any longer? >> >> >> Regards, >> Mikkel >> >> _______________________________________________ >> Camping-list mailing list >> Camping-list at rubyforge.org >> http://rubyforge.org/mailman/listinfo/camping-list >> > > _______________________________________________ > Camping-list mailing list > Camping-list at rubyforge.org > http://rubyforge.org/mailman/listinfo/camping-list > > > > _______________________________________________ > Camping-list mailing list > Camping-list at rubyforge.org > http://rubyforge.org/mailman/listinfo/camping-list >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/camping-list/attachments/20090507/2f25555b/attachment.html>