Skip to content

Commit

Permalink
fix(test): Remove mocha from the picture as rspec is enough
Browse files Browse the repository at this point in the history
  • Loading branch information
paulRbr committed Feb 7, 2014
1 parent e290c86 commit d1afa40
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
1 change: 0 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ group :test do
gem 'rspec', :require => false
gem 'simplecov', :require => false
gem 'coveralls', :require => false
gem 'mocha', :require => false
end

gemspec
6 changes: 2 additions & 4 deletions spec/unit/model_controller_spec.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
require File.expand_path '../../spec_helper.rb', __FILE__
require 'mocha/setup'
require 'mocha/api'

# Mock model constructed for the tests
class TestModel
Expand Down Expand Up @@ -33,8 +31,8 @@ def errors; []; end
before do
@any_model = 'TestModel'
@errors = ['error']
Yodatra::ModelController.any_instance.stubs(:model_name).returns(@any_model)
Array.any_instance.stubs(:full_messages).returns(@errors)
allow_any_instance_of(Yodatra::ModelController).to receive(:model_name).and_return(@any_model)
allow_any_instance_of(Array).to receive(:full_messages).and_return(@errors)
end

describe 'Getting a collection of the Model' do
Expand Down

0 comments on commit d1afa40

Please sign in to comment.