fix 0.6.1 → 0.7.0
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.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/.gitignore +1 -5
- data/.rubocop.yml +12 -0
- data/.travis.yml +12 -3
- data/.yardopts +1 -0
- data/CODE_OF_CONDUCT.md +13 -0
- data/Gemfile +1 -0
- data/LICENSE.md +17 -18
- data/README.md +70 -78
- data/Rakefile +5 -2
- data/VERSION.semver +1 -1
- data/bin/console +7 -0
- data/bin/setup +5 -0
- data/certs/gem-fixrb-public_cert.pem +21 -0
- data/fix.gemspec +17 -18
- data/lib/fix.rb +20 -98
- data/lib/fix/helpers/it_helper.rb +32 -0
- data/lib/fix/helpers/on_helper.rb +29 -0
- data/lib/fix/it.rb +6 -9
- data/lib/fix/on.rb +30 -13
- data/lib/fix/report.rb +61 -0
- data/lib/fix/sandbox.rb +25 -0
- data/lib/fix/test.rb +50 -224
- data/pkg_checksum +11 -0
- metadata +61 -152
- metadata.gz.sig +0 -0
- data/.coveralls.yml +0 -1
- data/bin/fix +0 -5
- data/fix.pem +0 -21
- data/lib/fix/db.rb +0 -23
- data/lib/fix/dsl.rb +0 -17
- data/lib/fix/expectation.rb +0 -80
- data/lib/fix/expectation_high.rb +0 -15
- data/lib/fix/expectation_low.rb +0 -19
- data/lib/fix/expectation_medium.rb +0 -21
- data/lib/fix/helper/it_helper.rb +0 -12
- data/lib/fix/helper/its_helper.rb +0 -20
- data/lib/fix/helper/let_accessor_helper.rb +0 -11
- data/lib/fix/helper/let_reader_helper.rb +0 -13
- data/lib/fix/helper/let_writer_helper.rb +0 -15
- data/lib/fix/helper/on_helper.rb +0 -20
- data/lib/fix/helper/requirement_helper.rb +0 -44
- data/lib/fix/its.rb +0 -13
- data/lib/fix/subject.rb +0 -44
- data/lib/fix/version.rb +0 -9
- data/spec/fix/bin/color_spec.rb +0 -17
- data/spec/fix/bin/exit_status_spec.rb +0 -19
- data/spec/fix/bin/help_spec.rb +0 -13
- data/spec/fix/bin/hide_progress.rb +0 -17
- data/spec/fix/bin/spec_helper.rb +0 -3
- data/spec/fix/bin/version_spec.rb +0 -9
- data/spec/fix/lib/may/error_spec.rb +0 -9
- data/spec/fix/lib/may/info_spec.rb +0 -9
- data/spec/fix/lib/may/spec_helper.rb +0 -1
- data/spec/fix/lib/may/success_spec.rb +0 -9
- data/spec/fix/lib/must/error_spec.rb +0 -9
- data/spec/fix/lib/must/failure_spec.rb +0 -9
- data/spec/fix/lib/must/spec_helper.rb +0 -1
- data/spec/fix/lib/must/success_spec.rb +0 -9
- data/spec/fix/lib/should/error_spec.rb +0 -9
- data/spec/fix/lib/should/info_spec.rb +0 -9
- data/spec/fix/lib/should/spec_helper.rb +0 -1
- data/spec/fix/lib/should/success_spec.rb +0 -9
- data/spec/fix/lib/spec_helper.rb +0 -1
- data/spec/fix/lib/success_spec.rb +0 -9
- data/spec/fix/spec_helper.rb +0 -1
- data/spec/spec_helper.rb +0 -4
- data/spec/support.rb +0 -3
- data/spec/support/coverage.rb +0 -9
- data/spec/support/env.rb +0 -1
- data/spec/support/examples/42/app.rb +0 -1
- data/spec/support/examples/42/may/error/spec.rb +0 -7
- data/spec/support/examples/42/may/error/test.rb +0 -7
- data/spec/support/examples/42/may/info/spec.rb +0 -7
- data/spec/support/examples/42/may/info/test.rb +0 -7
- data/spec/support/examples/42/may/success/spec.rb +0 -12
- data/spec/support/examples/42/may/success/test.rb +0 -7
- data/spec/support/examples/42/must/error/spec.rb +0 -11
- data/spec/support/examples/42/must/error/test.rb +0 -7
- data/spec/support/examples/42/must/failure/spec.rb +0 -7
- data/spec/support/examples/42/must/failure/test.rb +0 -7
- data/spec/support/examples/42/must/success/spec.rb +0 -7
- data/spec/support/examples/42/must/success/test.rb +0 -7
- data/spec/support/examples/42/should/error/spec.rb +0 -11
- data/spec/support/examples/42/should/error/test.rb +0 -7
- data/spec/support/examples/42/should/info/spec.rb +0 -7
- data/spec/support/examples/42/should/info/test.rb +0 -7
- data/spec/support/examples/42/should/success/spec.rb +0 -7
- data/spec/support/examples/42/should/success/test.rb +0 -7
- data/spec/support/examples/duck/app.rb +0 -16
- data/spec/support/examples/duck/success/spec.rb +0 -80
- data/spec/support/examples/duck/success/test.rb +0 -7
- data/spec/support/immutable.rb +0 -12
@@ -1 +0,0 @@
|
|
1
|
-
require_relative File.join '..', 'spec_helper'
|
data/spec/fix/lib/spec_helper.rb
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
require_relative File.join '..', 'spec_helper'
|
data/spec/fix/spec_helper.rb
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
require_relative File.join '..', 'spec_helper'
|
data/spec/spec_helper.rb
DELETED
data/spec/support.rb
DELETED
data/spec/support/coverage.rb
DELETED
data/spec/support/env.rb
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
abort "Needs Ruby 2, you're running: #{RUBY_VERSION}" if RUBY_VERSION < '2'
|
@@ -1 +0,0 @@
|
|
1
|
-
@app = 42
|
@@ -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
|
-
}
|
data/spec/support/immutable.rb
DELETED
@@ -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
|