spec/spec_helper.rb in api_mailer-0.0.4 vs spec/spec_helper.rb in api_mailer-0.0.5
- old
+ new
@@ -17,9 +17,10 @@
# the seed, which is printed after each run.
# --seed 1234
config.order = 'random'
config.before(:each) do
- Rails = double(root: Pathname.new(__FILE__).dirname,
- env: double(to_s: "test", test?: true))
+ Rails = double(:rails) unless defined?(Rails)
+ Rails.stub(:root).and_return(Pathname.new(__FILE__).dirname)
+ Rails.stub(:env).and_return(double(to_s: "test", test?: true))
end
end