Last active
December 31, 2015 19:59
-
-
Save philnash/8037170 to your computer and use it in GitHub Desktop.
Shoulda + Minitest 5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'minitest/autorun' | |
require 'shoulda-context' | |
class HelloWorld | |
def self.hello | |
"Hello world!" | |
end | |
end | |
class HelloWorldTest < MiniTest::Test | |
include ShouldaContextLoadable | |
should 'say hello world' do | |
assert_equal "Hello world!", HelloWorld.hello | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ ruby testcase.rb | |
MiniTest::Unit::TestCase is now Minitest::Test. From /Users/philnash/.rbenv/versions/2.0.0-p247/lib/ruby/2.0.0/test/unit/testcase.rb:8:in `<module:Unit>' | |
Run options: --seed 59078 | |
# Running: | |
Finished in 0.001670s, 0.0000 runs/s, 0.0000 assertions/s. | |
0 runs, 0 assertions, 0 failures, 0 errors, 0 skips |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment