I have some test using rails spec
(and also capybara
and factory girl
) and passing just fine
describe "project creation" do
before(:each) do
@project = FactoryGirl.create(:project)
end
it "create projects fluently" do
visit root_path
@project.should validate_presence_of(:title)
end
end
Then I installed spring
, and when I run spring rspec spec/features/projects_spec.rb
, it throws
Failure/Error: @project.should validate_presence_of(:title)
NoMethodError:
undefined method `validate_presence_of' for #<RSpec::Core::ExampleGroup...
How can it be