undees-bacon 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/COPYING +18 -0
- data/README +290 -0
- data/Rakefile +138 -0
- data/bin/bacon +117 -0
- data/lib/autotest/bacon.rb +36 -0
- data/lib/autotest/bacon_rspec.rb +2 -0
- data/lib/autotest/discover.rb +9 -0
- data/lib/bacon.rb +354 -0
- data/test/spec_bacon.rb +374 -0
- data/test/spec_nontrue.rb +14 -0
- data/test/spec_should.rb +32 -0
- metadata +66 -0
@@ -0,0 +1,14 @@
|
|
1
|
+
$false_is_not_true = false.should.not.be.true
|
2
|
+
$nil_is_not_true = nil.should.not.be.true
|
3
|
+
|
4
|
+
describe 'A non-true value' do
|
5
|
+
it 'should pass negated tests inside specs' do
|
6
|
+
false.should.not.be.true
|
7
|
+
nil.should.not.be.true
|
8
|
+
end
|
9
|
+
|
10
|
+
it 'should pass negated tests outside specs' do
|
11
|
+
$false_is_not_true.should.be.true
|
12
|
+
$nil_is_not_true.should.be.true
|
13
|
+
end
|
14
|
+
end
|
data/test/spec_should.rb
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
require File.join(File.dirname(__FILE__), '../lib/bacon')
|
2
|
+
|
3
|
+
describe "#should shortcut for #it('should')" do
|
4
|
+
|
5
|
+
should "be called" do
|
6
|
+
@called = true
|
7
|
+
@called.should.be == true
|
8
|
+
end
|
9
|
+
|
10
|
+
should "save some characters by typing should" do
|
11
|
+
lambda { should.satisfy { 1 == 1 } }.should.not.raise
|
12
|
+
end
|
13
|
+
|
14
|
+
should "save characters even on failure" do
|
15
|
+
lambda { should.satisfy { 1 == 2 } }.should.raise Bacon::Error
|
16
|
+
end
|
17
|
+
|
18
|
+
should "work nested" do
|
19
|
+
should.satisfy {1==1}
|
20
|
+
end
|
21
|
+
|
22
|
+
count = Bacon::Counter[:specifications]
|
23
|
+
should "add new specifications" do
|
24
|
+
# XXX this should +=1 but it's +=2
|
25
|
+
(count+1).should == Bacon::Counter[:specifications]
|
26
|
+
end
|
27
|
+
|
28
|
+
should "have been called" do
|
29
|
+
@called.should.be == true
|
30
|
+
end
|
31
|
+
|
32
|
+
end
|
metadata
ADDED
@@ -0,0 +1,66 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: undees-bacon
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.1.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Christian Neukirchen
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
|
12
|
+
date: 2009-01-06 00:00:00 -08:00
|
13
|
+
default_executable:
|
14
|
+
dependencies: []
|
15
|
+
|
16
|
+
description: Bacon is a small RSpec clone weighing less than 350 LoC but nevertheless providing all essential features. http://github.com/chneukirchen/bacon
|
17
|
+
email: chneukirchen@gmail.com
|
18
|
+
executables:
|
19
|
+
- bacon
|
20
|
+
extensions: []
|
21
|
+
|
22
|
+
extra_rdoc_files:
|
23
|
+
- README
|
24
|
+
- RDOX
|
25
|
+
files:
|
26
|
+
- COPYING
|
27
|
+
- README
|
28
|
+
- Rakefile
|
29
|
+
- bin/bacon
|
30
|
+
- lib/autotest/bacon.rb
|
31
|
+
- lib/autotest/bacon_rspec.rb
|
32
|
+
- lib/autotest/discover.rb
|
33
|
+
- lib/bacon.rb
|
34
|
+
- test/spec_bacon.rb
|
35
|
+
- test/spec_nontrue.rb
|
36
|
+
- test/spec_should.rb
|
37
|
+
- RDOX
|
38
|
+
has_rdoc: true
|
39
|
+
homepage: http://chneukirchen.org/repos/bacon
|
40
|
+
post_install_message:
|
41
|
+
rdoc_options:
|
42
|
+
- --main
|
43
|
+
- README
|
44
|
+
require_paths:
|
45
|
+
- lib
|
46
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
47
|
+
requirements:
|
48
|
+
- - ">="
|
49
|
+
- !ruby/object:Gem::Version
|
50
|
+
version: "0"
|
51
|
+
version:
|
52
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
53
|
+
requirements:
|
54
|
+
- - ">="
|
55
|
+
- !ruby/object:Gem::Version
|
56
|
+
version: "0"
|
57
|
+
version:
|
58
|
+
requirements: []
|
59
|
+
|
60
|
+
rubyforge_project:
|
61
|
+
rubygems_version: 1.2.0
|
62
|
+
signing_key:
|
63
|
+
specification_version: 2
|
64
|
+
summary: a small RSpec clone
|
65
|
+
test_files: []
|
66
|
+
|