Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Remove mocha to get rid of deprecation warning about mocha/setup

  • Loading branch information...
commit 9ff55a87b9f6a6c5bd5c5e03a87994b76048e8cc 1 parent b6fbfed
@mjankowski mjankowski authored
View
4 Gemfile.lock
@@ -46,10 +46,7 @@ GEM
libwebsocket (0.1.7.1)
addressable
websocket
- metaclass (0.0.1)
mime-types (1.19)
- mocha (0.13.1)
- metaclass (~> 0.0.1)
multi_json (1.5.0)
nokogiri (1.5.5)
rack (1.4.1)
@@ -106,7 +103,6 @@ DEPENDENCIES
appraisal
capybara (>= 0.4.0)
flutie!
- mocha
rspec-rails
sass
sqlite3
View
1  flutie.gemspec
@@ -21,5 +21,4 @@ Gem::Specification.new do |s|
s.add_development_dependency('capybara', '>= 0.4.0')
s.add_development_dependency('sqlite3')
s.add_development_dependency('sass')
- s.add_development_dependency('mocha')
end
View
24 spec/helpers/body_class_helper_spec.rb
@@ -3,10 +3,10 @@
describe BodyClassHelper, 'without any extra body classes' do
describe "body_class with a normal controller" do
before do
- controller = mock
- controller.stubs(:controller_path).returns('widgets')
- controller.stubs(:action_name).returns('show')
- helper.stubs(:controller).returns controller
+ controller = double('controller')
+ controller.stub(:controller_path).and_return('widgets')
+ controller.stub(:action_name).and_return('show')
+ helper.stub(:controller).and_return controller
end
it "should return the correct names" do
helper.body_class.should == "widgets widgets-show"
@@ -14,10 +14,10 @@
end
describe "body_class with a nested controller" do
before do
- controller = mock
- controller.stubs(:controller_path).returns('module/widgets')
- controller.stubs(:action_name).returns('show')
- helper.stubs(:controller).returns controller
+ controller = double('controller')
+ controller.stub(:controller_path).and_return('module/widgets')
+ controller.stub(:action_name).and_return('show')
+ helper.stub(:controller).and_return controller
end
it "should return the correct names" do
helper.body_class.should == "module-widgets module-widgets-show"
@@ -27,10 +27,10 @@
describe BodyClassHelper, 'with extra body classes' do
before do
- controller = mock
- controller.stubs(:controller_path).returns('widgets')
- controller.stubs(:action_name).returns('show')
- helper.stubs(:controller).returns controller
+ controller = double('controller')
+ controller.stub(:controller_path).and_return('widgets')
+ controller.stub(:action_name).and_return('show')
+ helper.stub(:controller).and_return controller
helper.content_for(:extra_body_classes, 'extra_class')
end
it "adds extra body classes to the controller classes" do
View
2  spec/spec_helper.rb
@@ -29,7 +29,7 @@
config.include RSpec::Matchers
# == Mock Framework
- config.mock_with :mocha
+ config.mock_framework = :rspec
end
require 'rexml/document'
Please sign in to comment.
Something went wrong with that request. Please try again.