There's probably a stack trace associated with that error, try looking in that. ----- Ryan Bigg Freelancer http://frozenplague.net
On 17/12/2008, at 5:31 PM, 乱翻字典 wrote: > > this my first rspec test, it is very simple > ----------------------------------------------------------------------------------------------------------------------------------------- >> > require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') > > describe Doc do > fixtures :docs > before(:each) do > @doc=docs(:yjn_bjy) > end > > it "should create a new instance given valid attributes" do > true > end > end > < > ----------------------------------------------------------------------------------------------------------------------------------------- > after run "spec -fs spec\models\doc_spec.rb" at cmd line,it report > this error > ----------------------------------------------------------------------------------------------------------------------------------------- >> > 1) > NoMethodError in 'Doc should create a new instance given valid > attributes' > undefined method `key?' for #<String:0x46b1df0> > < > ----------------------------------------------------------------------------------------------------------------------------------------- > > My environment: > OS:Windows > Rails:2.2.2 > RSpec:1.1.11 > rspec-rails:1.1.11 > IDE:Netbeans6.5 > Ruby:1.8.6 > > I use rspec_scaffold to generate these codes,and really confused about > this problems. > Hope for your suggestion! > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---

