In my specifications / models / user _spec.rb I have the following:
require 'spec_helper' describe User do before { 5.times { FactoryGirl.create(:sport) } } before { let(:user) { FactoryGirl.create(:user) } } ... end
But when running my user_spec.rb, I get this error:
Failure/Error: before { let(:user) { FactoryGirl.create(:user) } } NoMethodError: undefined method `let' for #<RSpec::Core::ExampleGroup::Nested_1:0x000001043033b0>
Which is strange, because my specifications worked so far, and I haven’t changed anything ...
Here is my gemfile: https://gist.github.com/4690919
Here is my spec_helper.rb: https://gist.github.com/4690935
I would be grateful for any help, thanks
source share