Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Minimum version of Ruby is 1.9.2.

  • Loading branch information...
commit 3a685fcd19744276d28550264100d302dbfc09b6 1 parent 35d469d
@tatey authored
Showing with 7 additions and 1 deletion.
  1. +5 −1 README.md
  2. +2 −0  simple_mock.gemspec
View
6 README.md
@@ -2,7 +2,7 @@
[![Build Status](https://secure.travis-ci.org/tatey/simple_mock.png?branch=master)](http://travis-ci.org/tatey/simple_mock)
-A fast, tiny (81 lines) hybrid mocking library. Mix classical mocking with real objects. There's no monkey patching `Object` or copying objects. Real objects are completely untainted. The interface is 100% compatible with [MiniTest::Mock](https://github.com/seattlerb/minitest) so there is nothing new to learn. SimpleMock's one and only dependancy is Ruby 1.9.2 or greater.
+A fast, tiny (81 lines) hybrid mocking library. Mix classical mocking with real objects. There's no monkey patching `Object` or copying. Real objects are completely untainted. The interface is 100% compatible with [MiniTest::Mock](https://github.com/seattlerb/minitest) so there is nothing new to learn. SimpleMock's one and only dependancy is Ruby 1.9.2 or greater.
## Installation
@@ -34,6 +34,10 @@ mock_model.verify # => true
Pass an object to mix expectations with the real object's original behaviour.
``` ruby
+class Post < ActiveRecord::Base
+ validates :title, :presence => true
+end
+
real_model = Post.new
mock_model = SimpleMock.new real_model
mock_model.expect :valid?, true
View
2  simple_mock.gemspec
@@ -13,6 +13,8 @@ Gem::Specification.new do |s|
s.rubyforge_project = "simple_mock"
+ s.required_ruby_version = '>= 1.9.2'
+
s.files = `git ls-files`.split("\n")
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
Please sign in to comment.
Something went wrong with that request. Please try again.