Skip to content

Commit

Permalink
Merge branch 'tests'
Browse files Browse the repository at this point in the history
  • Loading branch information
farnoy committed Jan 30, 2012
2 parents 70cd488 + 1d8156b commit e545df9
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 152 deletions.
10 changes: 3 additions & 7 deletions Gemfile.lock
Expand Up @@ -38,19 +38,14 @@ GEM
i18n (0.6.0)
json (1.6.5)
metaclass (0.0.1)
minitest (2.11.0)
mocha (0.10.3)
metaclass (~> 0.0.1)
multi_json (1.0.4)
rainbow (1.1.3)
rake (0.8.7)
rspec (2.8.0)
rspec-core (~> 2.8.0)
rspec-expectations (~> 2.8.0)
rspec-mocks (~> 2.8.0)
rspec-core (2.8.0)
rspec-expectations (2.8.0)
diff-lcs (~> 1.1.2)
rspec-mocks (2.8.0)
sqlite3 (1.3.5)
term-ansicolor (1.0.7)
tzinfo (0.3.31)
Expand All @@ -62,6 +57,7 @@ PLATFORMS
DEPENDENCIES
cucumber (>= 1.1.4)
github-api-client!
minitest (>= 2.11.0)
mocha (>= 0.10.0)
rspec (>= 2.7.0)
rspec-expectations (>= 2.7.0)
yard (>= 0.6.0)
14 changes: 5 additions & 9 deletions Rakefile
Expand Up @@ -18,15 +18,11 @@ task :irb do
system 'irb -I./lib -r github-api-client'
end

require 'rspec/core'
require 'rspec/core/rake_task'
RSpec::Core::RakeTask.new(:spec) do |spec|
spec.pattern = FileList['spec/**/*_spec.rb']
end

RSpec::Core::RakeTask.new(:rcov) do |spec|
spec.pattern = 'spec/**/*_spec.rb'
spec.rcov = true
desc 'run test suite'
task :tests do
Dir[File.dirname(__FILE__) + '/spec/*_spec.rb'].each do |file|
require file
end
end

require 'cucumber/rake/task'
Expand Down
3 changes: 2 additions & 1 deletion github-api-client.gemspec
Expand Up @@ -34,7 +34,8 @@ Gem::Specification.new do |s|
s.add_runtime_dependency("sqlite3", [">= 1.3.5"])
s.add_runtime_dependency("OptionParser", [">= 0.5.1"])

s.add_development_dependency("rspec", [">= 2.7.0"])
s.add_development_dependency("minitest", [">= 2.11.0"])
s.add_development_dependency("rspec-expectations", [">= 2.7.0"])
s.add_development_dependency("mocha", [">= 0.10.0"])
s.add_development_dependency("yard", [">= 0.6.0"])
s.add_development_dependency("cucumber", [">= 1.1.4"])
Expand Down
122 changes: 0 additions & 122 deletions spec/github-api-client_spec.rb

This file was deleted.

14 changes: 14 additions & 0 deletions spec/other_spec.rb
@@ -0,0 +1,14 @@
require 'minitest/spec'
MiniTest::Unit.autorun
require 'rspec/expectations'
require 'rspec/matchers'
require 'mocha'

describe "Testing framework other" do
it "executes" do
user = stub(:money => 50)
order = stub(:total_amount => 49.99)

user.money.should satisfy { |money| money > order.total_amount }
end
end
13 changes: 0 additions & 13 deletions spec/spec_helper.rb

This file was deleted.

13 changes: 13 additions & 0 deletions spec/test_spec.rb
@@ -0,0 +1,13 @@
require 'minitest/spec'
MiniTest::Unit.autorun
require 'rspec/expectations'
require 'rspec/matchers'
require 'mocha'

describe "Testing framework" do
it "executes" do
user = Struct.new("User", :name).new('kuba')
user.stubs(:age).returns(3)
3.should eq(user.age)
end
end

0 comments on commit e545df9

Please sign in to comment.