spicycode-micronaut 0.2.7 → 0.2.8
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +1 -1
- data/VERSION.yml +2 -2
- data/examples/example_helper.rb +1 -1
- data/examples/lib/micronaut/behaviour_example.rb +14 -0
- data/examples/lib/micronaut/example_example.rb +1 -1
- data/lib/micronaut/formatters/base_text_formatter.rb +6 -2
- data/lib/micronaut/rake_task.rb +1 -1
- metadata +68 -50
data/Rakefile
CHANGED
@@ -40,7 +40,7 @@ namespace :examples do
|
|
40
40
|
Micronaut::RakeTask.new :coverage do |t|
|
41
41
|
t.pattern = "examples/**/*_example.rb"
|
42
42
|
t.rcov = true
|
43
|
-
t.rcov_opts = %[--exclude "examples/*,gems/*,db/*,/Library/Ruby/*,config/*" --text-summary --sort coverage
|
43
|
+
t.rcov_opts = %[--exclude "examples/*,gems/*,db/*,/Library/Ruby/*,config/*" --text-summary --sort coverage]
|
44
44
|
end
|
45
45
|
|
46
46
|
end
|
data/VERSION.yml
CHANGED
data/examples/example_helper.rb
CHANGED
@@ -31,6 +31,20 @@ describe Micronaut::Behaviour do
|
|
31
31
|
end
|
32
32
|
end
|
33
33
|
|
34
|
+
pending "should build a nested name correctly, including the module, and each nested description in the correct order" do
|
35
|
+
behaviour_to_test = nil
|
36
|
+
|
37
|
+
isolate_behaviour do
|
38
|
+
Micronaut::Behaviour.describe(Micronaut, "test") do
|
39
|
+
Micronaut::Behaviour.describe("nested one") do
|
40
|
+
behaviour_to_test = Micronaut::Behaviour.describe("nested two") { }
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
behaviour_to_test.name.should == 'Micronaut - test - nested one - nested two'
|
46
|
+
end
|
47
|
+
|
34
48
|
end
|
35
49
|
|
36
50
|
describe '#describes' do
|
@@ -59,7 +59,7 @@ module Micronaut
|
|
59
59
|
output.puts "\nTop #{sorted_examples.size} slowest examples:\n"
|
60
60
|
sorted_examples.each do |example|
|
61
61
|
output.puts " (#{sprintf("%.7f", example.execution_result[:run_time])} seconds) #{example}"
|
62
|
-
output.puts grey(" # #{example.metadata[:caller]}")
|
62
|
+
output.puts grey(" # #{format_caller(example.metadata[:caller])}")
|
63
63
|
end
|
64
64
|
end
|
65
65
|
|
@@ -70,6 +70,10 @@ module Micronaut
|
|
70
70
|
# file, line = path.split(':')
|
71
71
|
# "txmt://open/?url=file://#{File.expand_path(file)}&line=#{line}"
|
72
72
|
# end
|
73
|
+
|
74
|
+
def format_caller(caller_info)
|
75
|
+
caller_info.to_s.split(':in `block').first
|
76
|
+
end
|
73
77
|
|
74
78
|
def dump_pending
|
75
79
|
unless pending_examples.empty?
|
@@ -77,7 +81,7 @@ module Micronaut
|
|
77
81
|
output.puts "Pending:"
|
78
82
|
pending_examples.each do |pending_example, message|
|
79
83
|
output.puts " #{pending_example}"
|
80
|
-
output.puts grey(" # #{pending_example.metadata[:caller]}")
|
84
|
+
output.puts grey(" # #{format_caller(pending_example.metadata[:caller])}")
|
81
85
|
end
|
82
86
|
end
|
83
87
|
output.flush
|
data/lib/micronaut/rake_task.rb
CHANGED
@@ -54,7 +54,7 @@ module Micronaut
|
|
54
54
|
desc("Run all examples") unless ::Rake.application.last_comment
|
55
55
|
|
56
56
|
task name do
|
57
|
-
RakeFileUtils.
|
57
|
+
RakeFileUtils.send(:verbose, verbose) do
|
58
58
|
if examples_to_run.empty?
|
59
59
|
puts "No examples matching #{pattern} could be found"
|
60
60
|
else
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spicycode-micronaut
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chad Humphries
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-
|
12
|
+
date: 2009-05-22 00:00:00 -07:00
|
13
13
|
default_executable: micronaut
|
14
14
|
dependencies: []
|
15
15
|
|
@@ -20,34 +20,64 @@ executables:
|
|
20
20
|
extensions: []
|
21
21
|
|
22
22
|
extra_rdoc_files:
|
23
|
-
- README.markdown
|
24
23
|
- LICENSE
|
24
|
+
- README.markdown
|
25
25
|
files:
|
26
26
|
- History.txt
|
27
27
|
- LICENSE
|
28
|
-
- Rakefile
|
29
28
|
- README.markdown
|
30
29
|
- RSPEC-LICENSE
|
30
|
+
- Rakefile
|
31
31
|
- VERSION.yml
|
32
32
|
- bin/micronaut
|
33
|
-
-
|
33
|
+
- examples/example_helper.rb
|
34
|
+
- examples/lib/micronaut/behaviour_example.rb
|
35
|
+
- examples/lib/micronaut/configuration_example.rb
|
36
|
+
- examples/lib/micronaut/example_example.rb
|
37
|
+
- examples/lib/micronaut/expectations/extensions/object_example.rb
|
38
|
+
- examples/lib/micronaut/expectations/fail_with_example.rb
|
39
|
+
- examples/lib/micronaut/expectations/wrap_expectation_example.rb
|
40
|
+
- examples/lib/micronaut/formatters/base_formatter_example.rb
|
41
|
+
- examples/lib/micronaut/formatters/documentation_formatter_example.rb
|
42
|
+
- examples/lib/micronaut/formatters/progress_formatter_example.rb
|
43
|
+
- examples/lib/micronaut/kernel_extensions_example.rb
|
44
|
+
- examples/lib/micronaut/matchers/be_close_example.rb
|
45
|
+
- examples/lib/micronaut/matchers/be_example.rb
|
46
|
+
- examples/lib/micronaut/matchers/change_example.rb
|
47
|
+
- examples/lib/micronaut/matchers/description_generation_example.rb
|
48
|
+
- examples/lib/micronaut/matchers/eql_example.rb
|
49
|
+
- examples/lib/micronaut/matchers/equal_example.rb
|
50
|
+
- examples/lib/micronaut/matchers/has_example.rb
|
51
|
+
- examples/lib/micronaut/matchers/have_example.rb
|
52
|
+
- examples/lib/micronaut/matchers/include_example.rb
|
53
|
+
- examples/lib/micronaut/matchers/match_example.rb
|
54
|
+
- examples/lib/micronaut/matchers/matcher_methods_example.rb
|
55
|
+
- examples/lib/micronaut/matchers/operator_matcher_example.rb
|
56
|
+
- examples/lib/micronaut/matchers/raise_error_example.rb
|
57
|
+
- examples/lib/micronaut/matchers/respond_to_example.rb
|
58
|
+
- examples/lib/micronaut/matchers/satisfy_example.rb
|
59
|
+
- examples/lib/micronaut/matchers/simple_matcher_example.rb
|
60
|
+
- examples/lib/micronaut/matchers/throw_symbol_example.rb
|
61
|
+
- examples/lib/micronaut/mocha_example.rb
|
62
|
+
- examples/lib/micronaut/runner_example.rb
|
63
|
+
- examples/lib/micronaut/world_example.rb
|
64
|
+
- examples/lib/micronaut_example.rb
|
65
|
+
- examples/resources/example_classes.rb
|
66
|
+
- lib/micronaut.rb
|
34
67
|
- lib/micronaut/behaviour.rb
|
35
68
|
- lib/micronaut/configuration.rb
|
36
69
|
- lib/micronaut/example.rb
|
37
|
-
- lib/micronaut/expectations
|
38
|
-
- lib/micronaut/expectations/extensions
|
70
|
+
- lib/micronaut/expectations.rb
|
39
71
|
- lib/micronaut/expectations/extensions/object.rb
|
40
72
|
- lib/micronaut/expectations/handler.rb
|
41
73
|
- lib/micronaut/expectations/wrap_expectation.rb
|
42
|
-
- lib/micronaut/
|
43
|
-
- lib/micronaut/formatters
|
74
|
+
- lib/micronaut/formatters.rb
|
44
75
|
- lib/micronaut/formatters/base_formatter.rb
|
45
76
|
- lib/micronaut/formatters/base_text_formatter.rb
|
46
77
|
- lib/micronaut/formatters/documentation_formatter.rb
|
47
78
|
- lib/micronaut/formatters/progress_formatter.rb
|
48
|
-
- lib/micronaut/formatters.rb
|
49
79
|
- lib/micronaut/kernel_extensions.rb
|
50
|
-
- lib/micronaut/matchers
|
80
|
+
- lib/micronaut/matchers.rb
|
51
81
|
- lib/micronaut/matchers/be.rb
|
52
82
|
- lib/micronaut/matchers/be_close.rb
|
53
83
|
- lib/micronaut/matchers/change.rb
|
@@ -65,32 +95,50 @@ files:
|
|
65
95
|
- lib/micronaut/matchers/satisfy.rb
|
66
96
|
- lib/micronaut/matchers/simple_matcher.rb
|
67
97
|
- lib/micronaut/matchers/throw_symbol.rb
|
68
|
-
- lib/micronaut/matchers.rb
|
69
|
-
- lib/micronaut/mocking
|
70
98
|
- lib/micronaut/mocking/with_absolutely_nothing.rb
|
71
99
|
- lib/micronaut/mocking/with_mocha.rb
|
72
100
|
- lib/micronaut/mocking/with_rr.rb
|
73
101
|
- lib/micronaut/rake_task.rb
|
74
102
|
- lib/micronaut/runner.rb
|
75
103
|
- lib/micronaut/world.rb
|
76
|
-
|
104
|
+
has_rdoc: true
|
105
|
+
homepage: http://github.com/spicycode/micronaut
|
106
|
+
post_install_message:
|
107
|
+
rdoc_options:
|
108
|
+
- --charset=UTF-8
|
109
|
+
require_paths:
|
110
|
+
- lib
|
111
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
112
|
+
requirements:
|
113
|
+
- - ">="
|
114
|
+
- !ruby/object:Gem::Version
|
115
|
+
version: "0"
|
116
|
+
version:
|
117
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
118
|
+
requirements:
|
119
|
+
- - ">="
|
120
|
+
- !ruby/object:Gem::Version
|
121
|
+
version: "0"
|
122
|
+
version:
|
123
|
+
requirements: []
|
124
|
+
|
125
|
+
rubyforge_project:
|
126
|
+
rubygems_version: 1.2.0
|
127
|
+
signing_key:
|
128
|
+
specification_version: 2
|
129
|
+
summary: An excellent replacement for the wheel...
|
130
|
+
test_files:
|
77
131
|
- examples/example_helper.rb
|
78
|
-
- examples/lib
|
79
|
-
- examples/lib/micronaut
|
80
132
|
- examples/lib/micronaut/behaviour_example.rb
|
81
133
|
- examples/lib/micronaut/configuration_example.rb
|
82
134
|
- examples/lib/micronaut/example_example.rb
|
83
|
-
- examples/lib/micronaut/expectations
|
84
|
-
- examples/lib/micronaut/expectations/extensions
|
85
135
|
- examples/lib/micronaut/expectations/extensions/object_example.rb
|
86
136
|
- examples/lib/micronaut/expectations/fail_with_example.rb
|
87
137
|
- examples/lib/micronaut/expectations/wrap_expectation_example.rb
|
88
|
-
- examples/lib/micronaut/formatters
|
89
138
|
- examples/lib/micronaut/formatters/base_formatter_example.rb
|
90
139
|
- examples/lib/micronaut/formatters/documentation_formatter_example.rb
|
91
140
|
- examples/lib/micronaut/formatters/progress_formatter_example.rb
|
92
141
|
- examples/lib/micronaut/kernel_extensions_example.rb
|
93
|
-
- examples/lib/micronaut/matchers
|
94
142
|
- examples/lib/micronaut/matchers/be_close_example.rb
|
95
143
|
- examples/lib/micronaut/matchers/be_example.rb
|
96
144
|
- examples/lib/micronaut/matchers/change_example.rb
|
@@ -112,34 +160,4 @@ files:
|
|
112
160
|
- examples/lib/micronaut/runner_example.rb
|
113
161
|
- examples/lib/micronaut/world_example.rb
|
114
162
|
- examples/lib/micronaut_example.rb
|
115
|
-
- examples/resources
|
116
163
|
- examples/resources/example_classes.rb
|
117
|
-
has_rdoc: true
|
118
|
-
homepage: http://github.com/spicycode/micronaut
|
119
|
-
post_install_message:
|
120
|
-
rdoc_options:
|
121
|
-
- --inline-source
|
122
|
-
- --charset=UTF-8
|
123
|
-
require_paths:
|
124
|
-
- lib
|
125
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
126
|
-
requirements:
|
127
|
-
- - ">="
|
128
|
-
- !ruby/object:Gem::Version
|
129
|
-
version: "0"
|
130
|
-
version:
|
131
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
132
|
-
requirements:
|
133
|
-
- - ">="
|
134
|
-
- !ruby/object:Gem::Version
|
135
|
-
version: "0"
|
136
|
-
version:
|
137
|
-
requirements: []
|
138
|
-
|
139
|
-
rubyforge_project:
|
140
|
-
rubygems_version: 1.2.0
|
141
|
-
signing_key:
|
142
|
-
specification_version: 2
|
143
|
-
summary: An excellent replacement for the wheel...
|
144
|
-
test_files: []
|
145
|
-
|