fix 0.6.1 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (95) hide show
  1. checksums.yaml +4 -4
  2. checksums.yaml.gz.sig +0 -0
  3. data.tar.gz.sig +0 -0
  4. data/.gitignore +1 -5
  5. data/.rubocop.yml +12 -0
  6. data/.travis.yml +12 -3
  7. data/.yardopts +1 -0
  8. data/CODE_OF_CONDUCT.md +13 -0
  9. data/Gemfile +1 -0
  10. data/LICENSE.md +17 -18
  11. data/README.md +70 -78
  12. data/Rakefile +5 -2
  13. data/VERSION.semver +1 -1
  14. data/bin/console +7 -0
  15. data/bin/setup +5 -0
  16. data/certs/gem-fixrb-public_cert.pem +21 -0
  17. data/fix.gemspec +17 -18
  18. data/lib/fix.rb +20 -98
  19. data/lib/fix/helpers/it_helper.rb +32 -0
  20. data/lib/fix/helpers/on_helper.rb +29 -0
  21. data/lib/fix/it.rb +6 -9
  22. data/lib/fix/on.rb +30 -13
  23. data/lib/fix/report.rb +61 -0
  24. data/lib/fix/sandbox.rb +25 -0
  25. data/lib/fix/test.rb +50 -224
  26. data/pkg_checksum +11 -0
  27. metadata +61 -152
  28. metadata.gz.sig +0 -0
  29. data/.coveralls.yml +0 -1
  30. data/bin/fix +0 -5
  31. data/fix.pem +0 -21
  32. data/lib/fix/db.rb +0 -23
  33. data/lib/fix/dsl.rb +0 -17
  34. data/lib/fix/expectation.rb +0 -80
  35. data/lib/fix/expectation_high.rb +0 -15
  36. data/lib/fix/expectation_low.rb +0 -19
  37. data/lib/fix/expectation_medium.rb +0 -21
  38. data/lib/fix/helper/it_helper.rb +0 -12
  39. data/lib/fix/helper/its_helper.rb +0 -20
  40. data/lib/fix/helper/let_accessor_helper.rb +0 -11
  41. data/lib/fix/helper/let_reader_helper.rb +0 -13
  42. data/lib/fix/helper/let_writer_helper.rb +0 -15
  43. data/lib/fix/helper/on_helper.rb +0 -20
  44. data/lib/fix/helper/requirement_helper.rb +0 -44
  45. data/lib/fix/its.rb +0 -13
  46. data/lib/fix/subject.rb +0 -44
  47. data/lib/fix/version.rb +0 -9
  48. data/spec/fix/bin/color_spec.rb +0 -17
  49. data/spec/fix/bin/exit_status_spec.rb +0 -19
  50. data/spec/fix/bin/help_spec.rb +0 -13
  51. data/spec/fix/bin/hide_progress.rb +0 -17
  52. data/spec/fix/bin/spec_helper.rb +0 -3
  53. data/spec/fix/bin/version_spec.rb +0 -9
  54. data/spec/fix/lib/may/error_spec.rb +0 -9
  55. data/spec/fix/lib/may/info_spec.rb +0 -9
  56. data/spec/fix/lib/may/spec_helper.rb +0 -1
  57. data/spec/fix/lib/may/success_spec.rb +0 -9
  58. data/spec/fix/lib/must/error_spec.rb +0 -9
  59. data/spec/fix/lib/must/failure_spec.rb +0 -9
  60. data/spec/fix/lib/must/spec_helper.rb +0 -1
  61. data/spec/fix/lib/must/success_spec.rb +0 -9
  62. data/spec/fix/lib/should/error_spec.rb +0 -9
  63. data/spec/fix/lib/should/info_spec.rb +0 -9
  64. data/spec/fix/lib/should/spec_helper.rb +0 -1
  65. data/spec/fix/lib/should/success_spec.rb +0 -9
  66. data/spec/fix/lib/spec_helper.rb +0 -1
  67. data/spec/fix/lib/success_spec.rb +0 -9
  68. data/spec/fix/spec_helper.rb +0 -1
  69. data/spec/spec_helper.rb +0 -4
  70. data/spec/support.rb +0 -3
  71. data/spec/support/coverage.rb +0 -9
  72. data/spec/support/env.rb +0 -1
  73. data/spec/support/examples/42/app.rb +0 -1
  74. data/spec/support/examples/42/may/error/spec.rb +0 -7
  75. data/spec/support/examples/42/may/error/test.rb +0 -7
  76. data/spec/support/examples/42/may/info/spec.rb +0 -7
  77. data/spec/support/examples/42/may/info/test.rb +0 -7
  78. data/spec/support/examples/42/may/success/spec.rb +0 -12
  79. data/spec/support/examples/42/may/success/test.rb +0 -7
  80. data/spec/support/examples/42/must/error/spec.rb +0 -11
  81. data/spec/support/examples/42/must/error/test.rb +0 -7
  82. data/spec/support/examples/42/must/failure/spec.rb +0 -7
  83. data/spec/support/examples/42/must/failure/test.rb +0 -7
  84. data/spec/support/examples/42/must/success/spec.rb +0 -7
  85. data/spec/support/examples/42/must/success/test.rb +0 -7
  86. data/spec/support/examples/42/should/error/spec.rb +0 -11
  87. data/spec/support/examples/42/should/error/test.rb +0 -7
  88. data/spec/support/examples/42/should/info/spec.rb +0 -7
  89. data/spec/support/examples/42/should/info/test.rb +0 -7
  90. data/spec/support/examples/42/should/success/spec.rb +0 -7
  91. data/spec/support/examples/42/should/success/test.rb +0 -7
  92. data/spec/support/examples/duck/app.rb +0 -16
  93. data/spec/support/examples/duck/success/spec.rb +0 -80
  94. data/spec/support/examples/duck/success/test.rb +0 -7
  95. data/spec/support/immutable.rb +0 -12
@@ -1,9 +0,0 @@
1
- require_relative 'spec_helper'
2
-
3
- subject -> {
4
- `ruby #{File.join File.dirname(__FILE__), '..', '..', '..', 'support', 'examples', '42', 'should', 'info', 'test.rb'}`
5
- }
6
-
7
- its :call do
8
- MUST match: /^100% compliant - 1 infos, 0 failures, 0 errors$/
9
- end
@@ -1 +0,0 @@
1
- require_relative File.join '..', 'spec_helper'
@@ -1,9 +0,0 @@
1
- require_relative 'spec_helper'
2
-
3
- subject -> {
4
- `ruby #{File.join File.dirname(__FILE__), '..', '..', '..', 'support', 'examples', '42', 'should', 'success', 'test.rb'}`
5
- }
6
-
7
- its :call do
8
- MUST match: /^100% compliant - 0 infos, 0 failures, 0 errors$/
9
- end
@@ -1 +0,0 @@
1
- require_relative File.join '..', 'spec_helper'
@@ -1,9 +0,0 @@
1
- require_relative 'spec_helper'
2
-
3
- subject -> {
4
- `ruby #{File.join File.dirname(__FILE__), '..', '..', 'support', 'examples', 'duck', 'success', 'test.rb'}`
5
- }
6
-
7
- its :call do
8
- MUST match: /^100% compliant - 0 infos, 0 failures, 0 errors$/
9
- end
@@ -1 +0,0 @@
1
- require_relative File.join '..', 'spec_helper'
@@ -1,4 +0,0 @@
1
- require_relative 'support'
2
-
3
- require_relative File.join '..', 'lib', 'fix'
4
- extend Fix::DSL
@@ -1,3 +0,0 @@
1
- Dir[File.join File.dirname(__FILE__), 'support', '**' '*.rb'].each do |filename|
2
- require_relative filename
3
- end
@@ -1,9 +0,0 @@
1
- require 'simplecov'
2
- require 'coveralls'
3
-
4
- SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
5
- SimpleCov::Formatter::HTMLFormatter,
6
- Coveralls::SimpleCov::Formatter
7
- ]
8
-
9
- SimpleCov.start
@@ -1 +0,0 @@
1
- abort "Needs Ruby 2, you're running: #{RUBY_VERSION}" if RUBY_VERSION < '2'
@@ -1 +0,0 @@
1
- @app = 42
@@ -1,7 +0,0 @@
1
- @specs = ->(front_object) {
2
- extend Fix::DSL
3
-
4
- subject front_object
5
-
6
- its(:/, 0) { MAY equal: 4 }
7
- }
@@ -1,7 +0,0 @@
1
- #!/usr/bin/env ruby -w
2
-
3
- require_relative File.join '..', '..', 'app'
4
- require_relative File.join '..', '..', '..', '..', '..', '..', 'lib', 'fix', 'dsl'
5
- require_relative 'spec'
6
-
7
- @specs.call @app
@@ -1,7 +0,0 @@
1
- @specs = ->(front_object) {
2
- extend Fix::DSL
3
-
4
- subject front_object
5
-
6
- its(:to_i) { MAY equal: 4 }
7
- }
@@ -1,7 +0,0 @@
1
- #!/usr/bin/env ruby -w
2
-
3
- require_relative File.join '..', '..', 'app'
4
- require_relative File.join '..', '..', '..', '..', '..', '..', 'lib', 'fix', 'dsl'
5
- require_relative 'spec'
6
-
7
- @specs.call @app
@@ -1,12 +0,0 @@
1
- @specs = ->(front_object) {
2
- extend Fix::DSL
3
-
4
- subject front_object
5
-
6
- its(:to_i) { MAY equal: 42 }
7
- its(:foo) { MAY equal: 4 }
8
-
9
- on :foo do
10
- its(:bar) { MAY equal: 4 }
11
- end
12
- }
@@ -1,7 +0,0 @@
1
- #!/usr/bin/env ruby -w
2
-
3
- require_relative File.join '..', '..', 'app'
4
- require_relative File.join '..', '..', '..', '..', '..', '..', 'lib', 'fix', 'dsl'
5
- require_relative 'spec'
6
-
7
- @specs.call @app
@@ -1,11 +0,0 @@
1
- @specs = ->(front_object) {
2
- extend Fix::DSL
3
-
4
- subject front_object
5
-
6
- its(:foo) { MUST equal: 4 }
7
-
8
- on :foo do
9
- its(:bar) { MUST equal: 4 }
10
- end
11
- }
@@ -1,7 +0,0 @@
1
- #!/usr/bin/env ruby -w
2
-
3
- require_relative File.join '..', '..', 'app'
4
- require_relative File.join '..', '..', '..', '..', '..', '..', 'lib', 'fix', 'dsl'
5
- require_relative 'spec'
6
-
7
- @specs.call @app
@@ -1,7 +0,0 @@
1
- @specs = ->(front_object) {
2
- extend Fix::DSL
3
-
4
- subject front_object
5
-
6
- its(:to_i) { MUST equal: 4 }
7
- }
@@ -1,7 +0,0 @@
1
- #!/usr/bin/env ruby -w
2
-
3
- require_relative File.join '..', '..', 'app'
4
- require_relative File.join '..', '..', '..', '..', '..', '..', 'lib', 'fix', 'dsl'
5
- require_relative 'spec'
6
-
7
- @specs.call @app
@@ -1,7 +0,0 @@
1
- @specs = ->(front_object) {
2
- extend Fix::DSL
3
-
4
- subject front_object
5
-
6
- its(:to_i) { MUST equal: 42 }
7
- }
@@ -1,7 +0,0 @@
1
- #!/usr/bin/env ruby -w
2
-
3
- require_relative File.join '..', '..', 'app'
4
- require_relative File.join '..', '..', '..', '..', '..', '..', 'lib', 'fix', 'dsl'
5
- require_relative 'spec'
6
-
7
- @specs.call @app
@@ -1,11 +0,0 @@
1
- @specs = ->(front_object) {
2
- extend Fix::DSL
3
-
4
- subject front_object
5
-
6
- its(:foo) { SHOULD equal: 4 }
7
-
8
- on :foo do
9
- its(:bar) { SHOULD equal: 4 }
10
- end
11
- }
@@ -1,7 +0,0 @@
1
- #!/usr/bin/env ruby -w
2
-
3
- require_relative File.join '..', '..', 'app'
4
- require_relative File.join '..', '..', '..', '..', '..', '..', 'lib', 'fix', 'dsl'
5
- require_relative 'spec'
6
-
7
- @specs.call @app
@@ -1,7 +0,0 @@
1
- @specs = ->(front_object) {
2
- extend Fix::DSL
3
-
4
- subject front_object
5
-
6
- its(:to_i) { SHOULD equal: 4 }
7
- }
@@ -1,7 +0,0 @@
1
- #!/usr/bin/env ruby -w
2
-
3
- require_relative File.join '..', '..', 'app'
4
- require_relative File.join '..', '..', '..', '..', '..', '..', 'lib', 'fix', 'dsl'
5
- require_relative 'spec'
6
-
7
- @specs.call @app
@@ -1,7 +0,0 @@
1
- @specs = ->(front_object) {
2
- extend Fix::DSL
3
-
4
- subject front_object
5
-
6
- its(:to_i) { SHOULD equal: 42 }
7
- }
@@ -1,7 +0,0 @@
1
- #!/usr/bin/env ruby -w
2
-
3
- require_relative File.join '..', '..', 'app'
4
- require_relative File.join '..', '..', '..', '..', '..', '..', 'lib', 'fix', 'dsl'
5
- require_relative 'spec'
6
-
7
- @specs.call @app
@@ -1,16 +0,0 @@
1
- class Duck
2
- def walks
3
- "Quaaa... Klop klop!"
4
- end
5
-
6
- def swims
7
- warn " ..."
8
- "Quaaa.."
9
- end
10
-
11
- def quacks
12
- puts "Quaaaaaack!"
13
- end
14
- end
15
-
16
- @app = Duck.new
@@ -1,80 +0,0 @@
1
- @specs = ->(front_object) {
2
- extend Fix::DSL
3
-
4
- require 'stringio'
5
-
6
- module Spectus
7
- module Matcher
8
-
9
- # Provides the implementation for `capture_stderr`.
10
- class CaptureStderr
11
- def initialize expected
12
- @expected = expected
13
- end
14
-
15
- # @return [Boolean] Comparison between actual and expected values.
16
- def matches?
17
- begin
18
- orig_std = $stderr
19
- $stderr = StringIO.new
20
-
21
- yield
22
- $stderr.string.eql? @expected
23
- ensure
24
- $stderr = orig_std
25
- end
26
- end
27
- end
28
-
29
- # Provides the implementation for `capture_stdout`.
30
- class CaptureStdout
31
- def initialize expected
32
- @expected = expected
33
- end
34
-
35
- # @return [Boolean] Comparison between actual and expected values.
36
- def matches?
37
- begin
38
- orig_std = $stdout
39
- $stdout = StringIO.new
40
-
41
- yield
42
- $stdout.string.eql? @expected
43
- ensure
44
- $stdout = orig_std
45
- end
46
- end
47
- end
48
- end
49
- end
50
-
51
- subject front_object
52
-
53
- let(:word) { "Quaaa" }
54
-
55
- on :swims do
56
- it { MUST capture_stderr: " ...\n" }
57
- end
58
-
59
- on :quacks do
60
- let(:quaaaaaack) { word + "aaack!\n" }
61
-
62
- it { SHOULD capture_stdout: quaaaaaack }
63
- end
64
-
65
- its(:speaks) { MUST raise_exception: NoMethodError }
66
-
67
- on :sings do
68
- it { MAY eql: "♪... ♫..." }
69
- end
70
-
71
- on :walks do
72
- let(:walks) { "#{word}... Klop klop!" }
73
-
74
- it { MUST eql: walks }
75
-
76
- on :split, '... ' do
77
- its(:last) { MUST eql: "Klop klop!" }
78
- end
79
- end
80
- }
@@ -1,7 +0,0 @@
1
- #!/usr/bin/env ruby -w
2
-
3
- require_relative File.join '..', 'app'
4
- require_relative File.join '..', '..', '..', '..', '..', 'lib', 'fix', 'dsl'
5
- require_relative 'spec'
6
-
7
- @specs.call @app
@@ -1,12 +0,0 @@
1
- class Object
2
- alias_method :overridden_initialize, :initialize
3
-
4
- def initialize
5
- overridden_initialize
6
-
7
- if !self.class.ancestors.include?(SimpleCov::Formatter::MultiFormatter) &&
8
- !self.class.ancestors.include?(SimpleCov::Formatter::HTMLFormatter)
9
- freeze
10
- end
11
- end
12
- end