Browse files

Stub with rspec instead of mocha.

  • Loading branch information...
1 parent f88e366 commit b6b2537460fd3a508b8afa2d624792e9d93dfd42 @oggy committed Sep 5, 2011
Showing with 5 additions and 8 deletions.
  1. +0 −1 looksee.gemspec
  2. +1 −1 spec/core_ext_spec.rb
  3. +4 −4 spec/inspector_spec.rb
  4. +0 −2 spec/spec_helper.rb
View
1 looksee.gemspec
@@ -24,6 +24,5 @@ Gem::Specification.new do |s|
s.specification_version = 3
s.add_development_dependency 'ritual', '0.3.0'
s.add_development_dependency 'rspec', '2.5.0'
- s.add_development_dependency 'mocha'
s.add_development_dependency 'wirble'
end
View
2 spec/core_ext_spec.rb
@@ -4,7 +4,7 @@
describe "#ls" do
before do
@object = Object.new
- Looksee.stubs(:default_specifiers).returns([:public, :overridden])
+ Looksee.stub(:default_specifiers).and_return([:public, :overridden])
end
it "should return an Inspector for the object's lookup path" do
View
8 spec/inspector_spec.rb
@@ -5,8 +5,8 @@
describe "#inspect" do
before do
- Looksee.stubs(:default_lookup_path_options).returns({})
- Looksee.stubs(:styles).returns(Hash.new{'%s'})
+ Looksee.stub(:default_lookup_path_options).and_return({})
+ Looksee.stub(:styles).and_return(Hash.new{'%s'})
@object = Object.new
temporary_module :M
@@ -52,7 +52,7 @@
end
it "should columnize output to the configured default otherwise" do
- Looksee.stubs(:default_width).returns(20)
+ Looksee.stub(:default_width).and_return(20)
inspector = Looksee::Inspector.new(@lookup_path, :visibilities => [:public])
inspector.inspect.should == <<-EOS.demargin.chomp
|M
@@ -159,7 +159,7 @@
:undefined => "~%s~",
:overridden => "(%s)",
}
- Looksee.stubs(:styles).returns(styles)
+ Looksee.stub(:styles).and_return(styles)
end
it "should delimit each word with the configured delimiters" do
View
2 spec/spec_helper.rb
@@ -1,7 +1,6 @@
ENV['LOOKSEE_METHODS'] = nil
require 'rspec'
-require 'mocha'
require 'looksee'
require 'rbconfig'
@@ -17,7 +16,6 @@
NATIVE_ADAPTER = Looksee.adapter
RSpec.configure do |config|
- config.mock_with :mocha
config.before { Looksee.adapter = TestAdapter.new }
end

0 comments on commit b6b2537

Please sign in to comment.