Skip to content

Instantly share code, notes, and snippets.

@myronmarston
Last active August 29, 2015 14:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save myronmarston/15b6b7707153e955dbcd to your computer and use it in GitHub Desktop.
Save myronmarston/15b6b7707153e955dbcd to your computer and use it in GitHub Desktop.
require 'celluloid'
RSpec.describe "Celluloid" do
it 'can mock a method' do
foo = Celluloid::AsyncProxy.new([], :bar)
expect(foo).to receive(:bar).once
foo.bar
end
end
# A sample Gemfile
source "https://rubygems.org"
gem 'celluloid'
gem 'rspec'
GEM
remote: https://rubygems.org/
specs:
celluloid (0.15.2)
timers (~> 1.1.0)
diff-lcs (1.2.5)
rspec (3.0.0)
rspec-core (~> 3.0.0)
rspec-expectations (~> 3.0.0)
rspec-mocks (~> 3.0.0)
rspec-core (3.0.2)
rspec-support (~> 3.0.0)
rspec-expectations (3.0.2)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.0.0)
rspec-mocks (3.0.2)
rspec-support (~> 3.0.0)
rspec-support (3.0.2)
timers (1.1.0)
PLATFORMS
ruby
DEPENDENCIES
celluloid
rspec
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment