insist 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,6 +1,9 @@
1
1
  language: ruby
2
2
  rvm:
3
+ - 1.8.7
3
4
  - 1.9.2
4
5
  - 1.9.3
6
+ - jruby-18mode # JRuby in 1.9 mode
5
7
  - jruby-19mode # JRuby in 1.9 mode
8
+ - rbx-18mode
6
9
  script: rspec
@@ -0,0 +1,30 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ insist (0.0.4)
5
+ cabin (> 0)
6
+
7
+ GEM
8
+ remote: http://rubygems.org/
9
+ specs:
10
+ cabin (0.4.3)
11
+ json
12
+ diff-lcs (1.1.3)
13
+ json (1.6.5)
14
+ json (1.6.5-java)
15
+ rspec (2.8.0)
16
+ rspec-core (~> 2.8.0)
17
+ rspec-expectations (~> 2.8.0)
18
+ rspec-mocks (~> 2.8.0)
19
+ rspec-core (2.8.0)
20
+ rspec-expectations (2.8.0)
21
+ diff-lcs (~> 1.1.2)
22
+ rspec-mocks (2.8.0)
23
+
24
+ PLATFORMS
25
+ java
26
+ ruby
27
+
28
+ DEPENDENCIES
29
+ insist!
30
+ rspec (~> 2.8.0)
data/README.md CHANGED
@@ -27,6 +27,7 @@ Using rspec's 'subject' stuff, you can write tests that are perhaps even more mi
27
27
  Here's an example test that fails. The subject is an 'insist' object, so you
28
28
  can just do the usual '==' and other methods on it:
29
29
 
30
+ # spec/example_spec.rb
30
31
  describe "thing" do
31
32
  subject { insist { "whoa!" } }
32
33
 
@@ -2,13 +2,13 @@ Gem::Specification.new do |spec|
2
2
  files = %x{git ls-files}.split("\n")
3
3
 
4
4
  spec.name = "insist"
5
- spec.version = "0.0.4"
5
+ spec.version = "0.0.5"
6
6
  spec.summary = "A simple block-driven assertion library for both testing and for production code"
7
7
  spec.description = spec.summary
8
8
  spec.license = "none chosen yet"
9
9
 
10
10
  # Note: You should set the version explicitly.
11
- spec.add_dependency "cabin", ">0" # for logging. apache 2 license
11
+ #spec.add_dependency "cabin", ">0" # for logging. apache 2 license
12
12
  spec.files = files
13
13
  spec.require_paths << "lib"
14
14
  spec.bindir = "bin"
@@ -6,6 +6,7 @@
6
6
  # insist { "foo" } == "foo"
7
7
  module Insist::Comparators
8
8
  include Insist::Assert
9
+ require "insist/comparators19" if RUBY_VERSION >= "1.9.2"
9
10
 
10
11
  # value == expected
11
12
  def ==(expected)
@@ -37,21 +38,4 @@ module Insist::Comparators
37
38
  "Expected #{value.inspect} < #{expected.inspect}")
38
39
  end # def <
39
40
 
40
- # value != expected
41
- def !=(expected)
42
- assert(value != expected,
43
- "Expected #{value.inspect} != #{expected.inspect}")
44
- end # def !=
45
-
46
- # value =~ pattern
47
- def =~(pattern)
48
- assert(value =~ pattern,
49
- "Expected #{value.inspect} =~ #{pattern.inspect}")
50
- end # def =~
51
-
52
- # value !~ pattern
53
- def !~(pattern)
54
- assert(value !~ pattern,
55
- "Expected #{value.inspect} !~ #{pattern.inspect}")
56
- end # def !~
57
41
  end # module Insist::Comparators
@@ -0,0 +1,23 @@
1
+
2
+ # TODO(sissel): This requires ruby 1.9.x
3
+ module Insist::Comparators
4
+ # value != expected
5
+ def !=(expected)
6
+ assert(value != expected,
7
+ "Expected #{value.inspect} != #{expected.inspect}")
8
+ end # def !=
9
+
10
+ # TODO(sissel): This requires ruby 1.9.x
11
+ # value =~ pattern
12
+ def =~(pattern)
13
+ assert(value =~ pattern,
14
+ "Expected #{value.inspect} =~ #{pattern.inspect}")
15
+ end # def =~
16
+
17
+ # TODO(sissel): This requires ruby 1.9.x
18
+ # value !~ pattern
19
+ def !~(pattern)
20
+ assert(value !~ pattern,
21
+ "Expected #{value.inspect} !~ #{pattern.inspect}")
22
+ end # def !~
23
+ end
@@ -80,7 +80,7 @@ describe Insist::Comparators do
80
80
  end
81
81
  end
82
82
 
83
- describe "#=~" do
83
+ describe "#=~", :if => (RUBY_VERSION >= "1.9.2") do
84
84
  subject do
85
85
  Insist.new { "hello" }
86
86
  end
@@ -94,7 +94,7 @@ describe Insist::Comparators do
94
94
  end
95
95
  end
96
96
 
97
- describe "#!~" do
97
+ describe "#!~", :if => (RUBY_VERSION >= "1.9.2") do
98
98
  subject do
99
99
  Insist.new { "hello" }
100
100
  end
metadata CHANGED
@@ -1,87 +1,84 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: insist
3
- version: !ruby/object:Gem::Version
4
- version: 0.0.4
3
+ version: !ruby/object:Gem::Version
5
4
  prerelease:
5
+ version: 0.0.5
6
6
  platform: ruby
7
- authors:
8
- - Jordan Sissel
7
+ authors:
8
+ - Jordan Sissel
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-03-10 00:00:00.000000000 Z
13
- dependencies:
14
- - !ruby/object:Gem::Dependency
15
- name: cabin
16
- requirement: &9912680 !ruby/object:Gem::Requirement
17
- none: false
18
- requirements:
19
- - - ! '>'
20
- - !ruby/object:Gem::Version
21
- version: '0'
22
- type: :runtime
23
- prerelease: false
24
- version_requirements: *9912680
25
- description: A simple block-driven assertion library for both testing and for production
26
- code
27
- email:
28
- - jls@semicomplete.com
12
+
13
+ date: 2012-03-19 00:00:00 Z
14
+ dependencies: []
15
+
16
+ description: A simple block-driven assertion library for both testing and for production code
17
+ email:
18
+ - jls@semicomplete.com
29
19
  executables: []
20
+
30
21
  extensions: []
22
+
31
23
  extra_rdoc_files: []
32
- files:
33
- - .batcave/manifest
34
- - .gitignore
35
- - .travis.yml
36
- - Gemfile
37
- - Makefile
38
- - README.md
39
- - insist.gemspec
40
- - lib/insist.rb
41
- - lib/insist/assert.rb
42
- - lib/insist/comparators.rb
43
- - lib/insist/enumerables.rb
44
- - lib/insist/failure.rb
45
- - lib/insist/namespace.rb
46
- - lib/insist/nil.rb
47
- - lib/insist/predicates.rb
48
- - lib/insist/raises.rb
49
- - notify-failure.sh
50
- - spec/insist/comparators_spec.rb
51
- - spec/insist/enumerables_spec.rb
52
- - spec/insist/nil_spec.rb
53
- - spec/insist/predicates_spec.rb
54
- - spec/insist_spec.rb
55
- - spec/spec_setup.rb
56
- - test/all.rb
57
- - test/docs.rb
58
- - test/testing.rb
24
+
25
+ files:
26
+ - .batcave/manifest
27
+ - .gitignore
28
+ - .travis.yml
29
+ - Gemfile
30
+ - Gemfile.lock
31
+ - Makefile
32
+ - README.md
33
+ - insist.gemspec
34
+ - lib/insist.rb
35
+ - lib/insist/assert.rb
36
+ - lib/insist/comparators.rb
37
+ - lib/insist/comparators19.rb
38
+ - lib/insist/enumerables.rb
39
+ - lib/insist/failure.rb
40
+ - lib/insist/namespace.rb
41
+ - lib/insist/nil.rb
42
+ - lib/insist/predicates.rb
43
+ - lib/insist/raises.rb
44
+ - notify-failure.sh
45
+ - spec/insist/comparators_spec.rb
46
+ - spec/insist/enumerables_spec.rb
47
+ - spec/insist/nil_spec.rb
48
+ - spec/insist/predicates_spec.rb
49
+ - spec/insist_spec.rb
50
+ - spec/spec_setup.rb
51
+ - test/all.rb
52
+ - test/docs.rb
53
+ - test/testing.rb
59
54
  homepage:
60
- licenses:
61
- - none chosen yet
55
+ licenses:
56
+ - none chosen yet
62
57
  post_install_message:
63
58
  rdoc_options: []
64
- require_paths:
65
- - lib
66
- - lib
67
- required_ruby_version: !ruby/object:Gem::Requirement
59
+
60
+ require_paths:
61
+ - lib
62
+ - lib
63
+ required_ruby_version: !ruby/object:Gem::Requirement
68
64
  none: false
69
- requirements:
70
- - - ! '>='
71
- - !ruby/object:Gem::Version
72
- version: '0'
73
- required_rubygems_version: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: "0"
69
+ required_rubygems_version: !ruby/object:Gem::Requirement
74
70
  none: false
75
- requirements:
76
- - - ! '>='
77
- - !ruby/object:Gem::Version
78
- version: '0'
71
+ requirements:
72
+ - - ">="
73
+ - !ruby/object:Gem::Version
74
+ version: "0"
79
75
  requirements: []
76
+
80
77
  rubyforge_project:
81
- rubygems_version: 1.8.16
78
+ rubygems_version: 1.8.15
82
79
  signing_key:
83
80
  specification_version: 3
84
- summary: A simple block-driven assertion library for both testing and for production
85
- code
81
+ summary: A simple block-driven assertion library for both testing and for production code
86
82
  test_files: []
83
+
87
84
  has_rdoc: