gmalamid-synthesis 0.1.6 → 0.1.7
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.
- data/Rakefile +22 -2
- data/lib/synthesis/adapter/mocha.rb +1 -1
- data/lib/synthesis/adapter/rspec.rb +11 -5
- data/lib/synthesis/recordable.rb +1 -1
- data/lib/synthesis/task.rb +1 -1
- data/synthesis.gemspec +1 -1
- metadata +2 -2
data/Rakefile
CHANGED
@@ -7,7 +7,7 @@ require File.dirname(__FILE__) + "/lib/synthesis/task"
|
|
7
7
|
|
8
8
|
load 'synthesis.gemspec'
|
9
9
|
|
10
|
-
task :default => :test
|
10
|
+
task :default => [:test, "test_project:all"]
|
11
11
|
|
12
12
|
desc "Run all tests"
|
13
13
|
task :test => %w[test:core test:mocha test:spec]
|
@@ -43,6 +43,26 @@ Synthesis::Task.new('synthesis:spec') do |t|
|
|
43
43
|
t.pattern = 'test_project/rspec/*_spec.rb'
|
44
44
|
end
|
45
45
|
|
46
|
+
namespace :test_project do
|
47
|
+
task :all do
|
48
|
+
STDOUT.puts `rake test_project:mocha`
|
49
|
+
STDOUT.puts `rake test_project:rspec`
|
50
|
+
STDOUT.puts `rake test_project:expectations`
|
51
|
+
end
|
52
|
+
|
53
|
+
Rake::TestTask.new('mocha') do |t|
|
54
|
+
t.pattern = 'test_project/mocha/**/*_test.rb'
|
55
|
+
end
|
56
|
+
|
57
|
+
Rake::TestTask.new('rspec') do |t|
|
58
|
+
t.pattern = 'test_project/mocha/**/*_test.rb'
|
59
|
+
end
|
60
|
+
|
61
|
+
Rake::TestTask.new('expectations') do |t|
|
62
|
+
t.pattern = 'test_project/mocha/**/*_test.rb'
|
63
|
+
end
|
64
|
+
end
|
65
|
+
|
46
66
|
desc 'Generate RDoc'
|
47
67
|
Rake::RDocTask.new do |task|
|
48
68
|
task.main = 'README'
|
@@ -66,7 +86,7 @@ end
|
|
66
86
|
desc "Remove rdoc and package artefacts"
|
67
87
|
task :clean => %w[clobber_package clobber_rdoc]
|
68
88
|
|
69
|
-
task(:lf) {p Dir["lib/**/*rb"]
|
89
|
+
task(:lf) {p Dir["lib/**/*rb"]}
|
70
90
|
|
71
91
|
task(:check_gemspec) do
|
72
92
|
require 'rubygems/specification'
|
@@ -7,11 +7,11 @@ require File.dirname(__FILE__) + "/../../synthesis"
|
|
7
7
|
module Synthesis
|
8
8
|
class RSpecAdapter < Adapter
|
9
9
|
def run
|
10
|
-
|
10
|
+
Synthesis.rspec_runner_options.files.clear
|
11
11
|
fail_unless do
|
12
|
-
|
13
|
-
#
|
14
|
-
|
12
|
+
Synthesis.rspec_runner_options.instance_variable_set(:@formatters, nil)
|
13
|
+
# Synthesis.rspec_runner_options.instance_variable_set(:@format_options, [["profile", STDOUT]])
|
14
|
+
Synthesis.rspec_runner_options.run_examples
|
15
15
|
end
|
16
16
|
end
|
17
17
|
|
@@ -30,5 +30,11 @@ module Synthesis
|
|
30
30
|
Spec::Mocks::MessageExpectation.stop_intercepting!
|
31
31
|
Spec::Mocks::Methods.stop_recording!
|
32
32
|
end
|
33
|
-
end
|
33
|
+
end
|
34
|
+
|
35
|
+
def rspec_runner_options
|
36
|
+
Spec::Runner.options rescue rspec_options
|
37
|
+
end
|
38
|
+
|
39
|
+
module_function :rspec_runner_options
|
34
40
|
end
|
data/lib/synthesis/recordable.rb
CHANGED
data/lib/synthesis/task.rb
CHANGED
@@ -9,7 +9,7 @@ module Synthesis
|
|
9
9
|
attr_accessor :verbose, :pattern, :ruby_opts, :adapter, :out, :ignored, :libs
|
10
10
|
|
11
11
|
def initialize(name='synthesis:test')
|
12
|
-
@name, @ignored, @libs = name, [], [
|
12
|
+
@name, @ignored, @libs = name, [], []
|
13
13
|
yield self if block_given?
|
14
14
|
@pattern ||= 'test/**/*_test.rb'
|
15
15
|
@ruby_opts ||= []
|
data/synthesis.gemspec
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gmalamid-synthesis
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stuart Caborn, George Malamidis
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2008-
|
12
|
+
date: 2008-10-09 00:00:00 -07:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|