ronin 1.0.0 → 1.1.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- data/.yardopts +0 -1
- data/ChangeLog.md +67 -3
- data/Gemfile +20 -12
- data/README.md +3 -5
- data/gemspec.yml +5 -5
- data/lib/ronin/address.rb +8 -3
- data/lib/ronin/arch.rb +39 -14
- data/lib/ronin/author.rb +2 -0
- data/lib/ronin/auto_load.rb +67 -0
- data/lib/ronin/campaign.rb +15 -2
- data/lib/ronin/class_methods.rb +7 -1
- data/lib/ronin/config.rb +5 -0
- data/lib/ronin/credential.rb +14 -3
- data/lib/ronin/database/database.rb +38 -12
- data/lib/ronin/database/migrations.rb +3 -1
- data/lib/ronin/database/migrations/add_created_at_column_to_targets_table.rb +48 -0
- data/lib/ronin/database/migrations/add_updated_at_column_to_campaigns_table.rb +47 -0
- data/lib/ronin/database/migrations/create_licenses_table.rb +1 -1
- data/lib/ronin/database/migrations/create_passwords_table.rb +1 -1
- data/lib/ronin/database/migrations/{create_cached_files_table.rb → create_script_paths_table.rb} +4 -4
- data/lib/ronin/database/migrations/migration.rb +3 -6
- data/lib/ronin/database/migrations/migrations.rb +3 -3
- data/lib/ronin/email_address.rb +20 -3
- data/lib/ronin/environment.rb +0 -3
- data/lib/ronin/host_name.rb +20 -6
- data/lib/ronin/host_name_ip_address.rb +2 -3
- data/lib/ronin/installation.rb +92 -23
- data/lib/ronin/ip_address.rb +31 -8
- data/lib/ronin/ip_address_mac_address.rb +2 -3
- data/lib/ronin/license.rb +1 -1
- data/lib/ronin/mac_address.rb +6 -4
- data/lib/ronin/model/class_methods.rb +4 -0
- data/lib/ronin/model/has_authors/class_methods.rb +4 -0
- data/lib/ronin/model/has_authors/has_authors.rb +4 -0
- data/lib/ronin/model/has_description/class_methods.rb +2 -0
- data/lib/ronin/model/has_description/has_description.rb +2 -0
- data/lib/ronin/model/has_license/class_methods.rb +2 -0
- data/lib/ronin/model/has_license/has_license.rb +4 -0
- data/lib/ronin/model/has_name/class_methods.rb +2 -0
- data/lib/ronin/model/has_name/has_name.rb +4 -0
- data/lib/ronin/model/has_title/class_methods.rb +2 -0
- data/lib/ronin/model/has_title/has_title.rb +2 -0
- data/lib/ronin/model/has_unique_name/class_methods.rb +2 -0
- data/lib/ronin/model/has_unique_name/has_unique_name.rb +7 -1
- data/lib/ronin/model/has_version/class_methods.rb +4 -0
- data/lib/ronin/model/has_version/has_version.rb +2 -0
- data/lib/ronin/model/model.rb +2 -0
- data/lib/ronin/model/types.rb +1 -7
- data/lib/ronin/model/types/description.rb +2 -0
- data/lib/ronin/network/mixins/esmtp.rb +40 -25
- data/lib/ronin/network/mixins/http.rb +336 -73
- data/lib/ronin/network/mixins/imap.rb +38 -25
- data/lib/ronin/network/mixins/pop3.rb +34 -21
- data/lib/ronin/network/mixins/smtp.rb +40 -25
- data/lib/ronin/network/mixins/tcp.rb +66 -41
- data/lib/ronin/network/mixins/telnet.rb +43 -30
- data/lib/ronin/network/mixins/udp.rb +59 -40
- data/lib/ronin/open_port.rb +12 -5
- data/lib/ronin/organization.rb +1 -2
- data/lib/ronin/os.rb +10 -3
- data/lib/ronin/os_guess.rb +2 -3
- data/lib/ronin/password.rb +11 -3
- data/lib/ronin/port.rb +7 -2
- data/lib/ronin/{engine/exceptions/deploy_failed.rb → repositories.rb} +4 -6
- data/lib/ronin/repository.rb +110 -37
- data/lib/ronin/ronin.rb +4 -3
- data/lib/ronin/{engine.rb → script.rb} +2 -1
- data/lib/ronin/{engine → script}/buildable.rb +43 -29
- data/lib/ronin/script/class_methods.rb +84 -0
- data/lib/ronin/{engine → script}/deployable.rb +61 -40
- data/lib/ronin/{engine → script}/exceptions.rb +4 -3
- data/lib/ronin/script/exceptions/deploy_failed.rb +27 -0
- data/lib/ronin/{engine/exceptions/not_built.rb → script/exceptions/exception.rb} +2 -2
- data/lib/ronin/{engine/exceptions/verification_failed.rb → script/exceptions/not_built.rb} +4 -2
- data/lib/ronin/script/exceptions/test_failed.rb +27 -0
- data/lib/ronin/script/instance_methods.rb +217 -0
- data/lib/ronin/script/path.rb +277 -0
- data/lib/ronin/{engine/engine.rb → script/script.rb} +52 -15
- data/lib/ronin/{engine/verifiable.rb → script/testable.rb} +97 -68
- data/lib/ronin/service.rb +1 -2
- data/lib/ronin/service_credential.rb +1 -2
- data/lib/ronin/software.rb +3 -2
- data/lib/ronin/spec/database.rb +0 -4
- data/lib/ronin/target.rb +11 -3
- data/lib/ronin/tcp_port.rb +3 -2
- data/lib/ronin/udp_port.rb +2 -0
- data/lib/ronin/ui/cli/cli.rb +6 -0
- data/lib/ronin/ui/cli/command.rb +48 -12
- data/lib/ronin/ui/cli/commands/campaigns.rb +3 -3
- data/lib/ronin/ui/cli/commands/console.rb +2 -1
- data/lib/ronin/ui/cli/commands/creds.rb +3 -3
- data/lib/ronin/ui/cli/commands/database.rb +1 -17
- data/lib/ronin/ui/cli/commands/emails.rb +3 -3
- data/lib/ronin/ui/cli/commands/hosts.rb +3 -7
- data/lib/ronin/ui/cli/commands/ips.rb +3 -7
- data/lib/ronin/ui/cli/commands/repos.rb +5 -17
- data/lib/ronin/ui/cli/commands/urls.rb +3 -3
- data/lib/ronin/ui/cli/model_command.rb +82 -97
- data/lib/ronin/ui/cli/resources_command.rb +89 -0
- data/lib/ronin/ui/cli/script_command.rb +115 -0
- data/lib/ronin/ui/console.rb +17 -3
- data/lib/ronin/ui/output/helpers.rb +18 -0
- data/lib/ronin/ui/output/output.rb +20 -1
- data/lib/ronin/ui/output/terminal/color.rb +10 -0
- data/lib/ronin/ui/output/terminal/raw.rb +10 -0
- data/lib/ronin/ui/shell.rb +2 -0
- data/lib/ronin/url.rb +47 -12
- data/lib/ronin/url_query_param.rb +4 -0
- data/lib/ronin/url_scheme.rb +3 -3
- data/lib/ronin/user_name.rb +2 -0
- data/lib/ronin/version.rb +1 -1
- data/lib/ronin/web_credential.rb +6 -3
- data/spec/arch_spec.rb +3 -3
- data/spec/classes/my_script.rb +21 -0
- data/spec/helpers/repos/{test1 → installed}/ronin.yml +1 -1
- data/spec/helpers/repos/{hello/cache → installed/scripts}/.keep +0 -0
- data/spec/helpers/repos/local/lib/init.rb +1 -0
- data/spec/helpers/repos/{hello → local}/lib/stuff/another_test.rb +0 -0
- data/spec/helpers/repos/{hello → local}/lib/stuff/test.rb +0 -0
- data/spec/helpers/repos/{random → local}/ronin.yml +1 -1
- data/spec/helpers/repos/{random/cache → local/scripts}/.keep +0 -0
- data/spec/helpers/repos/{hello → remote}/ronin.yml +1 -1
- data/spec/helpers/repos/remote/scripts/.keep +0 -0
- data/spec/helpers/repos/{test2 → scripts}/ronin.yml +0 -0
- data/spec/helpers/repos/scripts/scripts/cached/cached.rb +10 -0
- data/spec/helpers/repos/scripts/scripts/cached/missing.rb +10 -0
- data/spec/helpers/repos/scripts/scripts/cached/modified.rb +10 -0
- data/spec/helpers/repos/scripts/scripts/cached/unmodified.rb +10 -0
- data/spec/helpers/repos/scripts/scripts/failures/exceptions.rb +11 -0
- data/spec/helpers/repos/{test2/cache/cacheable_model → scripts/scripts/failures}/load_errors.rb +3 -1
- data/spec/helpers/repos/{test2/cache/cacheable_model → scripts/scripts/failures}/name_errors.rb +1 -0
- data/spec/helpers/repos/scripts/scripts/failures/no_method_errors.rb +10 -0
- data/spec/helpers/repos/scripts/scripts/failures/syntax_errors.rb +11 -0
- data/spec/helpers/repos/scripts/scripts/failures/validation_errors.rb +11 -0
- data/spec/helpers/repos/scripts/scripts/my_scripts/test.rb +16 -0
- data/spec/model/spec_helper.rb +0 -2
- data/spec/repository_spec.rb +61 -81
- data/spec/ronin_spec.rb +2 -2
- data/spec/{engine → script}/buildable_spec.rb +9 -9
- data/spec/script/classes/buildable_class.rb +15 -0
- data/spec/script/classes/deployable_class.rb +13 -0
- data/spec/{engine/classes/engine_class.rb → script/classes/script_class.rb} +3 -3
- data/spec/{engine/classes/verifiable_class.rb → script/classes/testable_class.rb} +5 -5
- data/spec/{engine → script}/deployable_spec.rb +10 -10
- data/spec/{cached_file_spec.rb → script/path_spec.rb} +33 -72
- data/spec/script/script_spec.rb +130 -0
- data/spec/script/testable_spec.rb +117 -0
- data/spec/spec_helper.rb +15 -13
- metadata +114 -139
- data/lib/ronin/cached_file.rb +0 -247
- data/lib/ronin/engine/class_methods.rb +0 -135
- data/lib/ronin/engine/instance_methods.rb +0 -97
- data/lib/ronin/model/cacheable.rb +0 -21
- data/lib/ronin/model/cacheable/cacheable.rb +0 -273
- data/lib/ronin/model/cacheable/class_methods.rb +0 -60
- data/lib/ronin/ui/cli/engine_command.rb +0 -106
- data/spec/engine/classes/buildable_class.rb +0 -15
- data/spec/engine/classes/deployable_class.rb +0 -13
- data/spec/engine/engine_spec.rb +0 -55
- data/spec/engine/verifiable_spec.rb +0 -117
- data/spec/helpers/repos/hello/lib/init.rb +0 -1
- data/spec/helpers/repos/test1/cache/cacheable_model/one.rb +0 -15
- data/spec/helpers/repos/test2/cache/cacheable_model/exceptions.rb +0 -7
- data/spec/helpers/repos/test2/cache/cacheable_model/no_method_errors.rb +0 -9
- data/spec/helpers/repos/test2/cache/cacheable_model/syntax_errors.rb +0 -7
- data/spec/helpers/repos/test2/cache/cacheable_model/two.rb +0 -15
- data/spec/helpers/repos/test2/cache/cacheable_model/validation_errors.rb +0 -9
- data/spec/model/cacheable_spec.rb +0 -96
- data/spec/model/models/cacheable_model.rb +0 -13
data/spec/model/spec_helper.rb
CHANGED
@@ -1,6 +1,5 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
require 'model/models/basic_model'
|
3
|
-
require 'model/models/cacheable_model'
|
4
3
|
require 'model/models/custom_model'
|
5
4
|
require 'model/models/authored_model'
|
6
5
|
require 'model/models/described_model'
|
@@ -11,7 +10,6 @@ require 'model/models/titled_model'
|
|
11
10
|
RSpec.configure do |spec|
|
12
11
|
spec.before(:suite) do
|
13
12
|
BasicModel.auto_migrate!
|
14
|
-
CacheableModel.auto_migrate!
|
15
13
|
CustomModel.auto_migrate!
|
16
14
|
AuthoredModel.auto_migrate!
|
17
15
|
DescribedModel.auto_migrate!
|
data/spec/repository_spec.rb
CHANGED
@@ -1,6 +1,5 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
require 'helpers/repositories'
|
3
|
-
require 'model/models/cacheable_model'
|
4
3
|
|
5
4
|
require 'ronin/repository'
|
6
5
|
|
@@ -11,16 +10,16 @@ describe Repository do
|
|
11
10
|
|
12
11
|
describe "find" do
|
13
12
|
it "should be able to retrieve an Repository by name" do
|
14
|
-
repo = subject.find('
|
13
|
+
repo = subject.find('local')
|
15
14
|
|
16
|
-
repo.name.should == '
|
15
|
+
repo.name.should == 'local'
|
17
16
|
end
|
18
17
|
|
19
18
|
it "should be able to retrieve an Repository by name and domain" do
|
20
|
-
repo = subject.find('
|
19
|
+
repo = subject.find('installed/github.com')
|
21
20
|
|
22
|
-
repo.name.should == '
|
23
|
-
repo.domain.should == '
|
21
|
+
repo.name.should == 'installed'
|
22
|
+
repo.domain.should == 'github.com'
|
24
23
|
end
|
25
24
|
|
26
25
|
it "should raise RepositoryNotFound for unknown Repository names" do
|
@@ -51,13 +50,13 @@ describe Repository do
|
|
51
50
|
|
52
51
|
it "should not allow adding an Repository from the same path twice" do
|
53
52
|
lambda {
|
54
|
-
subject.add!(:path => repository('
|
53
|
+
subject.add!(:path => repository('local').path)
|
55
54
|
}.should raise_error(DuplicateRepository)
|
56
55
|
end
|
57
56
|
|
58
57
|
it "should not allow adding an Repository that was already installed" do
|
59
58
|
lambda {
|
60
|
-
subject.add!(:path => repository('
|
59
|
+
subject.add!(:path => repository('installed').path)
|
61
60
|
}.should raise_error(DuplicateRepository)
|
62
61
|
end
|
63
62
|
end
|
@@ -71,46 +70,46 @@ describe Repository do
|
|
71
70
|
|
72
71
|
it "should not allow installing an Repository that was already added" do
|
73
72
|
lambda {
|
74
|
-
subject.install!(:uri => repository('
|
73
|
+
subject.install!(:uri => repository('remote').uri)
|
75
74
|
}.should raise_error(DuplicateRepository)
|
76
75
|
end
|
77
76
|
|
78
77
|
it "should not allow installing an Repository from the same URI twice" do
|
79
78
|
lambda {
|
80
|
-
subject.install!(:uri => repository('
|
79
|
+
subject.install!(:uri => repository('installed').uri)
|
81
80
|
}.should raise_error(DuplicateRepository)
|
82
81
|
end
|
83
82
|
end
|
84
83
|
|
85
84
|
describe "#domain" do
|
86
85
|
it "should be considered local for 'localhost' domains" do
|
87
|
-
|
86
|
+
repo = repository('local')
|
88
87
|
|
89
|
-
|
90
|
-
|
88
|
+
repo.should be_local
|
89
|
+
repo.should_not be_remote
|
91
90
|
end
|
92
91
|
|
93
92
|
it "should be considered remote for non 'localhost' domains" do
|
94
|
-
|
93
|
+
repo = repository('installed')
|
95
94
|
|
96
|
-
|
97
|
-
|
95
|
+
repo.should be_remote
|
96
|
+
repo.should_not be_local
|
98
97
|
end
|
99
98
|
end
|
100
99
|
|
101
100
|
describe "#initialize" do
|
102
101
|
it "should default the 'name' property to the name of the Repository directory" do
|
103
102
|
repo = subject.new(
|
104
|
-
:path => File.join(Helpers::Repositories::DIR,'
|
103
|
+
:path => File.join(Helpers::Repositories::DIR,'local')
|
105
104
|
)
|
106
105
|
|
107
|
-
repo.name.should == '
|
106
|
+
repo.name.should == 'local'
|
108
107
|
end
|
109
108
|
|
110
109
|
it "should default the 'installed' property to false" do
|
111
110
|
repo = subject.new(
|
112
|
-
:path => File.join(Helpers::Repositories::DIR,'
|
113
|
-
:uri => 'git://github.com/path/to/
|
111
|
+
:path => File.join(Helpers::Repositories::DIR,'local'),
|
112
|
+
:uri => 'git://github.com/path/to/local.git'
|
114
113
|
)
|
115
114
|
|
116
115
|
repo.installed.should == false
|
@@ -118,10 +117,10 @@ describe Repository do
|
|
118
117
|
end
|
119
118
|
|
120
119
|
describe "#initialize_metadata" do
|
121
|
-
subject { repository('
|
120
|
+
subject { repository('installed') }
|
122
121
|
|
123
122
|
it "should load the title" do
|
124
|
-
subject.title.should == '
|
123
|
+
subject.title.should == 'Installed Repo'
|
125
124
|
end
|
126
125
|
|
127
126
|
it "should load the website" do
|
@@ -150,14 +149,14 @@ describe Repository do
|
|
150
149
|
end
|
151
150
|
|
152
151
|
describe "#activate!" do
|
153
|
-
subject { repository('
|
152
|
+
subject { repository('local') }
|
154
153
|
|
155
154
|
before(:all) do
|
156
155
|
subject.activate!
|
157
156
|
end
|
158
157
|
|
159
158
|
it "should load the init.rb file if present" do
|
160
|
-
$
|
159
|
+
$local_repo_loaded.should == true
|
161
160
|
end
|
162
161
|
|
163
162
|
it "should make the lib directory accessible to Kernel#require" do
|
@@ -166,7 +165,7 @@ describe Repository do
|
|
166
165
|
end
|
167
166
|
|
168
167
|
describe "#deactivate!" do
|
169
|
-
subject { repository('
|
168
|
+
subject { repository('local') }
|
170
169
|
|
171
170
|
before(:all) do
|
172
171
|
subject.deactivate!
|
@@ -179,112 +178,93 @@ describe Repository do
|
|
179
178
|
end
|
180
179
|
end
|
181
180
|
|
182
|
-
describe "#
|
183
|
-
subject { repository('
|
181
|
+
describe "#each_script" do
|
182
|
+
subject { repository('scripts') }
|
184
183
|
|
185
184
|
it "should list the contents of the 'cache/' directory" do
|
186
|
-
subject.
|
185
|
+
subject.each_script.to_a.should_not be_empty
|
187
186
|
end
|
188
187
|
|
189
188
|
it "should only list '.rb' files" do
|
190
|
-
subject.
|
191
|
-
|
192
|
-
|
193
|
-
path.extname.should == '.rb'
|
194
|
-
}.should == true
|
189
|
+
subject.each_script.map { |path|
|
190
|
+
path.extname
|
191
|
+
}.uniq.should == ['.rb']
|
195
192
|
end
|
196
193
|
end
|
197
194
|
|
198
|
-
describe "#
|
199
|
-
|
200
|
-
CacheableModel.auto_migrate!
|
201
|
-
end
|
202
|
-
|
203
|
-
let(:test1) { repository('test1') }
|
204
|
-
let(:test2) { repository('test2') }
|
195
|
+
describe "#script_paths" do
|
196
|
+
subject { repository('scripts') }
|
205
197
|
|
206
|
-
describe "#
|
207
|
-
before(:all)
|
208
|
-
test1.cache_files!
|
209
|
-
test2.cache_files!
|
210
|
-
end
|
198
|
+
describe "#cache_scripts!" do
|
199
|
+
before(:all) { subject.cache_scripts! }
|
211
200
|
|
212
|
-
it "should be populated
|
213
|
-
|
201
|
+
it "should be populated script_paths" do
|
202
|
+
subject.script_paths.should_not be_empty
|
214
203
|
end
|
215
204
|
|
216
205
|
it "should recover from files that contain syntax errors" do
|
217
|
-
|
218
|
-
cached_file.path.basename == Pathname.new('syntax_errors.rb')
|
219
|
-
}.should == true
|
206
|
+
subject.find_script('failures/syntax_errors.rb').should_not be_nil
|
220
207
|
end
|
221
208
|
|
222
209
|
it "should recover from files that raised exceptions" do
|
223
|
-
|
224
|
-
cached_file.path.basename == Pathname.new('exceptions.rb')
|
225
|
-
}.should == true
|
210
|
+
subject.find_script('failures/exceptions.rb').should_not be_nil
|
226
211
|
end
|
227
212
|
|
228
213
|
it "should recover from files that raise NoMethodError" do
|
229
|
-
|
230
|
-
cached_file.path.basename == Pathname.new('no_method_errors.rb')
|
231
|
-
}.should == true
|
214
|
+
subject.find_script('failures/no_method_errors.rb').should_not be_nil
|
232
215
|
end
|
233
216
|
|
234
217
|
it "should recover from files that have validation errors" do
|
235
|
-
|
236
|
-
cached_file.path.basename == Pathname.new('validation_errors.rb')
|
237
|
-
}.should == true
|
218
|
+
subject.find_script('failures/validation_errors.rb').should_not be_nil
|
238
219
|
end
|
239
220
|
|
240
|
-
it "should clear
|
241
|
-
|
242
|
-
|
221
|
+
it "should clear script_paths before re-populate them" do
|
222
|
+
paths = subject.script_paths.length
|
223
|
+
subject.cache_scripts!
|
243
224
|
|
244
|
-
|
225
|
+
subject.script_paths.length.should == paths
|
245
226
|
end
|
246
227
|
|
247
228
|
it "should be populated using the paths in the 'cache/' directory" do
|
248
|
-
|
229
|
+
subject.script_paths.map { |file|
|
249
230
|
file.path
|
250
|
-
}.should ==
|
231
|
+
}.should == subject.each_script.to_a
|
251
232
|
end
|
252
233
|
end
|
253
234
|
|
254
|
-
describe "#
|
235
|
+
describe "#sync_scripts!" do
|
255
236
|
before(:all) do
|
256
|
-
|
257
|
-
test2.cache_files!
|
237
|
+
subject.cache_scripts!
|
258
238
|
|
259
|
-
|
239
|
+
script_path = subject.find_script('cached/modified.rb')
|
260
240
|
|
261
|
-
|
262
|
-
|
241
|
+
script_path.timestamp -= 10
|
242
|
+
script_path.save
|
263
243
|
|
264
|
-
|
244
|
+
script_path = subject.find_script('cached/cached.rb')
|
245
|
+
script_path.destroy!
|
265
246
|
|
266
|
-
|
267
|
-
test2.sync_cached_files!
|
247
|
+
subject.sync_scripts!
|
268
248
|
end
|
269
249
|
|
270
250
|
it "should update stale cached files" do
|
271
|
-
|
251
|
+
script_path = subject.find_script('cached/modified.rb')
|
272
252
|
|
273
|
-
|
253
|
+
script_path.timestamp.should == File.mtime(script_path.path)
|
274
254
|
end
|
275
255
|
|
276
256
|
it "should cache new files" do
|
277
|
-
|
257
|
+
subject.find_script('cached/cached.rb').should_not be_nil
|
278
258
|
end
|
279
259
|
end
|
280
260
|
|
281
|
-
describe "#
|
261
|
+
describe "#clean_scripts!" do
|
282
262
|
before(:all) do
|
283
|
-
|
263
|
+
subject.clean_scripts!
|
284
264
|
end
|
285
265
|
|
286
|
-
it "should clear the
|
287
|
-
|
266
|
+
it "should clear the script_paths" do
|
267
|
+
subject.script_paths.should be_empty
|
288
268
|
end
|
289
269
|
end
|
290
270
|
end
|
data/spec/ronin_spec.rb
CHANGED
@@ -10,8 +10,8 @@ describe Ronin do
|
|
10
10
|
version.should_not be_empty
|
11
11
|
end
|
12
12
|
|
13
|
-
it "should include
|
14
|
-
subject.should include(
|
13
|
+
it "should include AutoLoad" do
|
14
|
+
subject.should include(AutoLoad)
|
15
15
|
end
|
16
16
|
|
17
17
|
it "should add a const_missing method when included" do
|
@@ -1,8 +1,8 @@
|
|
1
1
|
require 'spec_helper'
|
2
|
-
require 'ronin/
|
3
|
-
require '
|
2
|
+
require 'ronin/script/buildable'
|
3
|
+
require 'script/classes/buildable_class'
|
4
4
|
|
5
|
-
describe
|
5
|
+
describe Script::Buildable do
|
6
6
|
subject do
|
7
7
|
obj = BuildableClass.new
|
8
8
|
obj.instance_eval do
|
@@ -16,8 +16,8 @@ describe Engine::Buildable do
|
|
16
16
|
subject.should_not be_built
|
17
17
|
end
|
18
18
|
|
19
|
-
it "should include
|
20
|
-
subject.class.included_modules.should include(
|
19
|
+
it "should include Testable" do
|
20
|
+
subject.class.included_modules.should include(Script::Testable)
|
21
21
|
end
|
22
22
|
|
23
23
|
describe "#build!" do
|
@@ -27,7 +27,7 @@ describe Engine::Buildable do
|
|
27
27
|
subject.output.should == "hello world"
|
28
28
|
end
|
29
29
|
|
30
|
-
it "should mark the
|
30
|
+
it "should mark the script as built" do
|
31
31
|
subject.build!
|
32
32
|
|
33
33
|
subject.should be_built
|
@@ -42,10 +42,10 @@ describe Engine::Buildable do
|
|
42
42
|
end
|
43
43
|
|
44
44
|
describe "#verify!" do
|
45
|
-
it "should raise a NotBuilt exception when verifying unbuilt
|
45
|
+
it "should raise a NotBuilt exception when verifying unbuilt scripts" do
|
46
46
|
lambda {
|
47
|
-
subject.
|
48
|
-
}.should raise_error(
|
47
|
+
subject.test!
|
48
|
+
}.should raise_error(Script::NotBuilt)
|
49
49
|
end
|
50
50
|
end
|
51
51
|
end
|