diff options
Diffstat (limited to 'activesupport/test')
-rw-r--r-- | activesupport/test/string_inquirer_test.rb | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/activesupport/test/string_inquirer_test.rb b/activesupport/test/string_inquirer_test.rb index bb15916e9e..94d5fe197d 100644 --- a/activesupport/test/string_inquirer_test.rb +++ b/activesupport/test/string_inquirer_test.rb @@ -1,15 +1,23 @@ require 'abstract_unit' class StringInquirerTest < ActiveSupport::TestCase + def setup + @string_inquirer = ActiveSupport::StringInquirer.new('production') + end + def test_match - assert ActiveSupport::StringInquirer.new("production").production? + assert @string_inquirer.production? end def test_miss - assert !ActiveSupport::StringInquirer.new("production").development? + refute @string_inquirer.development? end def test_missing_question_mark - assert_raise(NoMethodError) { ActiveSupport::StringInquirer.new("production").production } + assert_raise(NoMethodError) { @string_inquirer.production } + end + + def test_respond_to + assert_respond_to @string_inquirer, :development? end end |