Permalink
Browse files

Switch from mocha to rspec mocks

  • Loading branch information...
1 parent 64735d0 commit e2ad4dd9e07e692e2fb51f777ab7aba46cb7e94f @benlangfeld benlangfeld committed Nov 15, 2012
Showing with 4 additions and 5 deletions.
  1. +0 −1 ruby_fs.gemspec
  2. +3 −3 spec/ruby_fs/stream_spec.rb
  3. +1 −1 spec/spec_helper.rb
View
@@ -25,7 +25,6 @@ Gem::Specification.new do |s|
s.add_development_dependency %q<rspec>, [">= 2.5.0"]
s.add_development_dependency %q<yard>, ["~> 0.6"]
s.add_development_dependency %q<rake>, [">= 0"]
- s.add_development_dependency %q<mocha>, [">= 0"]
s.add_development_dependency %q<guard-rspec>
s.add_development_dependency %q<ruby_gntp>
end
@@ -30,7 +30,7 @@ def client.messages
def mocked_server(times = nil, fake_client = nil, &block)
mock_target = MockServer.new
- mock_target.expects(:receive_data).send(*(times ? [:times, times] : [:at_least, 1])).with &block
+ mock_target.should_receive(:receive_data).send(*(times ? [:exactly, times] : [:at_least, 1])).with &block
s = ServerMock.new '127.0.0.1', server_port, mock_target
@stream = Stream.new '127.0.0.1', server_port, secret, lambda { |m| client.message_received m }, events
@stream.run!
@@ -41,11 +41,11 @@ def mocked_server(times = nil, fake_client = nil, &block)
end
def expect_connected_event
- client.expects(:message_received).with Stream::Connected.new
+ client.should_receive(:message_received).with Stream::Connected.new
end
def expect_disconnected_event
- client.expects(:message_received).with Stream::Disconnected.new
+ client.should_receive(:message_received).with Stream::Disconnected.new
end
before { @sequence = 1 }
View
@@ -5,7 +5,7 @@
include RubyFS
RSpec.configure do |config|
- config.mock_with :mocha
+ config.mock_with :rspec
config.filter_run :focus => true
config.run_all_when_everything_filtered = true
end

0 comments on commit e2ad4dd

Please sign in to comment.