Skip to content

Commit

Permalink
Minor updates to unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
JaniJegoroff committed Sep 11, 2014
1 parent bed04da commit ade9a9f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
require 'minitest/spec'
require 'minitest/autorun'
require 'minitest/reporters'

Expand Down
6 changes: 3 additions & 3 deletions spec/spec_to_boolean.rb
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
require_relative 'spec_helper'

class TestToBoolean < Minitest::Spec
describe TestToBoolean do
class SpecToBoolean < Minitest::Spec
describe 'to_boolean' do
it 'should return true' do
[true, 'true', 'TRUE', 1, '1'].each do |value|
value.to_boolean.must_equal(true)
end
end

it 'should return false' do
[false, 'false', 'FALSE', 0, '0', nil, :symbol].each do |value|
[false, 'false', 'FALSE', 0, '0', nil, :symbol, ''].each do |value|
value.to_boolean.must_equal(false)
end
end
Expand Down

0 comments on commit ade9a9f

Please sign in to comment.