before(:each) do
@created_challenges = FactoryGirl.create_list(:challenge, 25)
FactoryGirl.create(:user_challenge_owner,
:user => FactoryGirl.create(:user,
:email => 'uni...@unique.com',
:username => '1111111111'),
:challenge => created_challenges[0])
end
it "excludes challenges owned by 1111111111 from total_pending" do
@created_challenges[0].start_date = 100.day.from_now
Challenge.total_pending == 0
end
Failure/Error: :challenge => created_challenges[0])
NameError:
undefined local variable or method `created_challenges' for #<RSpec::Core::ExampleGroup::Nested_1::Nested_2::Nested_3:0xb26bc30>
# ./spec/models/challenge_spec.rb:187:in `block (4 levels) in <top (required)>'