Permalink
Browse files

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

  • Loading branch information...
1 parent b6fbfed commit 9ff55a87b9f6a6c5bd5c5e03a87994b76048e8cc @mjankowski mjankowski committed Dec 12, 2012
Showing with 13 additions and 18 deletions.
  1. +0 −4 Gemfile.lock
  2. +0 −1 flutie.gemspec
  3. +12 −12 spec/helpers/body_class_helper_spec.rb
  4. +1 −1 spec/spec_helper.rb
View
@@ -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
@@ -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
@@ -3,21 +3,21 @@
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"
end
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
@@ -29,7 +29,7 @@
config.include RSpec::Matchers
# == Mock Framework
- config.mock_with :mocha
+ config.mock_framework = :rspec
end
require 'rexml/document'

0 comments on commit 9ff55a8

Please sign in to comment.