test-unit-context 0.3.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
| @@ -3,13 +3,15 @@ require 'time' | |
| 3 3 | 
             
            module Test::Unit::Context
         | 
| 4 4 | 
             
              module Helpers
         | 
| 5 5 |  | 
| 6 | 
            +
                CONST_NAME_SUB_ = /[\s:\-'",\.~;!?#=\(\)&]+/ # :nodoc:
         | 
| 7 | 
            +
                
         | 
| 6 8 | 
             
                module_function
         | 
| 7 9 |  | 
| 8 10 | 
             
                def to_const_name(str, prefix = nil, suffix = nil)
         | 
| 9 11 | 
             
                  name = str.dup
         | 
| 10 12 | 
             
                  name.lstrip! if prefix
         | 
| 11 13 | 
             
                  name.rstrip! if suffix
         | 
| 12 | 
            -
                  name.gsub!( | 
| 14 | 
            +
                  name.gsub!(CONST_NAME_SUB_, '_')
         | 
| 13 15 | 
             
                  name.gsub!(/\/(.?)/) { $1.upcase }
         | 
| 14 16 | 
             
                  name.gsub!(/(?:^|_)(.)/) { $1.upcase }
         | 
| 15 17 | 
             
                  "#{prefix}#{name}#{suffix}"
         | 
| @@ -16,6 +16,14 @@ module Test::Unit | |
| 16 16 | 
             
                  assert self.class.respond_to? :contexts
         | 
| 17 17 | 
             
                end
         | 
| 18 18 |  | 
| 19 | 
            +
                def test_context_naming
         | 
| 20 | 
            +
                  Class.new(Test::Unit::TestCase) do
         | 
| 21 | 
            +
                    context("kiss = simple_name") {}
         | 
| 22 | 
            +
                    context("a_(not-so)_simple; name") {}
         | 
| 23 | 
            +
                    context("an '&\" name !?") {}
         | 
| 24 | 
            +
                  end
         | 
| 25 | 
            +
                end
         | 
| 26 | 
            +
                
         | 
| 19 27 | 
             
                class Default < Test::Unit::TestCase
         | 
| 20 28 | 
             
                  CONTEXT = context "When testing" do
         | 
| 21 29 | 
             
                    def test_this_thing
         | 
    
        metadata
    CHANGED
    
    | @@ -1,105 +1,101 @@ | |
| 1 | 
            -
            --- !ruby/object:Gem::Specification | 
| 1 | 
            +
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: test-unit-context
         | 
| 3 | 
            -
            version: !ruby/object:Gem::Version | 
| 3 | 
            +
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            +
              version: 0.3.1
         | 
| 4 5 | 
             
              prerelease: 
         | 
| 5 | 
            -
              version: 0.3.0
         | 
| 6 6 | 
             
            platform: ruby
         | 
| 7 | 
            -
            authors: | 
| 8 | 
            -
             | 
| 7 | 
            +
            authors:
         | 
| 8 | 
            +
            - kares
         | 
| 9 9 | 
             
            autorequire: 
         | 
| 10 10 | 
             
            bindir: bin
         | 
| 11 11 | 
             
            cert_chain: []
         | 
| 12 | 
            -
             | 
| 13 | 
            -
             | 
| 14 | 
            -
             | 
| 15 | 
            -
               | 
| 16 | 
            -
             | 
| 17 | 
            -
                 | 
| 18 | 
            -
             | 
| 19 | 
            -
             | 
| 20 | 
            -
             | 
| 21 | 
            -
             | 
| 22 | 
            -
             | 
| 23 | 
            -
             | 
| 24 | 
            -
             | 
| 25 | 
            -
                 | 
| 26 | 
            -
             | 
| 27 | 
            -
                 | 
| 28 | 
            -
             | 
| 29 | 
            -
             | 
| 30 | 
            -
             | 
| 31 | 
            -
             | 
| 32 | 
            -
             | 
| 33 | 
            -
             | 
| 34 | 
            -
                 | 
| 35 | 
            -
                 | 
| 36 | 
            -
             | 
| 37 | 
            -
             | 
| 38 | 
            -
               | 
| 39 | 
            -
               | 
| 40 | 
            -
               | 
| 41 | 
            -
             | 
| 42 | 
            -
             | 
| 43 | 
            -
             | 
| 12 | 
            +
            date: 2013-04-25 00:00:00.000000000 Z
         | 
| 13 | 
            +
            dependencies:
         | 
| 14 | 
            +
            - !ruby/object:Gem::Dependency
         | 
| 15 | 
            +
              name: test-unit
         | 
| 16 | 
            +
              requirement: !ruby/object:Gem::Requirement
         | 
| 17 | 
            +
                none: false
         | 
| 18 | 
            +
                requirements:
         | 
| 19 | 
            +
                - - ! '>='
         | 
| 20 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 21 | 
            +
                    version: 2.4.0
         | 
| 22 | 
            +
              type: :runtime
         | 
| 23 | 
            +
              prerelease: false
         | 
| 24 | 
            +
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 25 | 
            +
                none: false
         | 
| 26 | 
            +
                requirements:
         | 
| 27 | 
            +
                - - ! '>='
         | 
| 28 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 29 | 
            +
                    version: 2.4.0
         | 
| 30 | 
            +
            - !ruby/object:Gem::Dependency
         | 
| 31 | 
            +
              name: rake
         | 
| 32 | 
            +
              requirement: !ruby/object:Gem::Requirement
         | 
| 33 | 
            +
                none: false
         | 
| 34 | 
            +
                requirements:
         | 
| 35 | 
            +
                - - ! '>='
         | 
| 36 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 37 | 
            +
                    version: '0'
         | 
| 38 | 
            +
              type: :development
         | 
| 39 | 
            +
              prerelease: false
         | 
| 40 | 
            +
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 41 | 
            +
                none: false
         | 
| 42 | 
            +
                requirements:
         | 
| 43 | 
            +
                - - ! '>='
         | 
| 44 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 45 | 
            +
                    version: '0'
         | 
| 46 | 
            +
            description: ! "Makes Test::Unit::TestCases 'contextable' and thus much\neasier to
         | 
| 47 | 
            +
              read and write. If you've seen RSpec than it's the very same 'context \ndo ... end'
         | 
| 48 | 
            +
              re-invendet for Test::Unit. Inspired by gem 'context' that does the\nsame for the
         | 
| 49 | 
            +
              'old' Test::Unit 1.2.3 bundled with Ruby 1.8.x standard libraries."
         | 
| 50 | 
            +
            email:
         | 
| 51 | 
            +
            - self@kares.org
         | 
| 44 52 | 
             
            executables: []
         | 
| 45 | 
            -
             | 
| 46 53 | 
             
            extensions: []
         | 
| 47 | 
            -
             | 
| 48 | 
            -
             | 
| 49 | 
            -
             | 
| 50 | 
            -
             | 
| 51 | 
            -
             | 
| 52 | 
            -
             | 
| 53 | 
            -
             | 
| 54 | 
            -
             | 
| 55 | 
            -
             | 
| 56 | 
            -
             | 
| 57 | 
            -
             | 
| 58 | 
            -
             | 
| 59 | 
            -
             | 
| 60 | 
            -
             | 
| 61 | 
            -
             | 
| 62 | 
            -
             | 
| 63 | 
            -
             | 
| 64 | 
            -
             | 
| 65 | 
            -
             | 
| 66 | 
            -
             | 
| 67 | 
            -
             | 
| 68 | 
            -
             | 
| 69 | 
            -
             | 
| 70 | 
            -
              - test/test_helper.rb
         | 
| 54 | 
            +
            extra_rdoc_files:
         | 
| 55 | 
            +
            - README.md
         | 
| 56 | 
            +
            - LICENSE
         | 
| 57 | 
            +
            files:
         | 
| 58 | 
            +
            - .gitignore
         | 
| 59 | 
            +
            - .travis.yml
         | 
| 60 | 
            +
            - Gemfile
         | 
| 61 | 
            +
            - LICENSE
         | 
| 62 | 
            +
            - README.md
         | 
| 63 | 
            +
            - Rakefile
         | 
| 64 | 
            +
            - lib/test/unit/context.rb
         | 
| 65 | 
            +
            - lib/test/unit/context/context.rb
         | 
| 66 | 
            +
            - lib/test/unit/context/helpers.rb
         | 
| 67 | 
            +
            - lib/test/unit/context/shared.rb
         | 
| 68 | 
            +
            - lib/test/unit/context/spec.rb
         | 
| 69 | 
            +
            - lib/test/unit/context/version.rb
         | 
| 70 | 
            +
            - test-unit-context.gemspec
         | 
| 71 | 
            +
            - test/test/unit/context/hooks_test.rb
         | 
| 72 | 
            +
            - test/test/unit/context/shared_test.rb
         | 
| 73 | 
            +
            - test/test/unit/context/spec_spec.rb
         | 
| 74 | 
            +
            - test/test/unit/context/spec_test.rb
         | 
| 75 | 
            +
            - test/test/unit/context_test.rb
         | 
| 76 | 
            +
            - test/test_helper.rb
         | 
| 71 77 | 
             
            homepage: http://github.com/kares/test-unit-context
         | 
| 72 78 | 
             
            licenses: []
         | 
| 73 | 
            -
             | 
| 74 79 | 
             
            post_install_message: 
         | 
| 75 80 | 
             
            rdoc_options: []
         | 
| 76 | 
            -
             | 
| 77 | 
            -
             | 
| 78 | 
            -
             | 
| 79 | 
            -
            required_ruby_version: !ruby/object:Gem::Requirement 
         | 
| 81 | 
            +
            require_paths:
         | 
| 82 | 
            +
            - lib
         | 
| 83 | 
            +
            required_ruby_version: !ruby/object:Gem::Requirement
         | 
| 80 84 | 
             
              none: false
         | 
| 81 | 
            -
              requirements: | 
| 82 | 
            -
             | 
| 83 | 
            -
             | 
| 84 | 
            -
             | 
| 85 | 
            -
             | 
| 86 | 
            -
                      - 0
         | 
| 87 | 
            -
                    version: "0"
         | 
| 88 | 
            -
            required_rubygems_version: !ruby/object:Gem::Requirement 
         | 
| 85 | 
            +
              requirements:
         | 
| 86 | 
            +
              - - ! '>='
         | 
| 87 | 
            +
                - !ruby/object:Gem::Version
         | 
| 88 | 
            +
                  version: '0'
         | 
| 89 | 
            +
            required_rubygems_version: !ruby/object:Gem::Requirement
         | 
| 89 90 | 
             
              none: false
         | 
| 90 | 
            -
              requirements: | 
| 91 | 
            -
             | 
| 92 | 
            -
             | 
| 93 | 
            -
             | 
| 94 | 
            -
                    segments: 
         | 
| 95 | 
            -
                      - 0
         | 
| 96 | 
            -
                    version: "0"
         | 
| 91 | 
            +
              requirements:
         | 
| 92 | 
            +
              - - ! '>='
         | 
| 93 | 
            +
                - !ruby/object:Gem::Version
         | 
| 94 | 
            +
                  version: '0'
         | 
| 97 95 | 
             
            requirements: []
         | 
| 98 | 
            -
             | 
| 99 96 | 
             
            rubyforge_project: 
         | 
| 100 | 
            -
            rubygems_version: 1.8. | 
| 97 | 
            +
            rubygems_version: 1.8.23
         | 
| 101 98 | 
             
            signing_key: 
         | 
| 102 99 | 
             
            specification_version: 3
         | 
| 103 100 | 
             
            summary: Context for Test::Unit (2.x)
         | 
| 104 101 | 
             
            test_files: []
         | 
| 105 | 
            -
             |