Skip to content

Commit 06f17c4

Browse files
author
--unset
committed
fix version string
1 parent 59c728e commit 06f17c4

File tree

4 files changed

+115
-115
lines changed

4 files changed

+115
-115
lines changed

Rakefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ end
3838

3939
Spec::Rake::SpecTask.new('test') do |t|
4040
t.libs << File.join(File.dirname(__FILE__), 'lib')
41-
t.spec_files = FileList['spec/**/*_spec.rb']
41+
t.spec_files = FileList['spec/**/*_.rb']
4242
end
4343

4444
Spec::Rake::SpecTask.new(:rcov) do |t|

VERSION.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
---
22
:major: 1
33
:minor: 0
4-
:patch: 1
4+
:patch: 0

lib/rasta/fixture/base_fixture.rb

+112-112
Original file line numberDiff line numberDiff line change
@@ -1,113 +1,113 @@
1-
module Rasta
2-
module Fixture
3-
4-
module BaseFixture
5-
include Rasta::Spreadsheet
6-
7-
def initialize_test_fixture(roo_reference)
8-
@oo = roo_reference
9-
@metrics = Metrics.new
10-
end
11-
12-
# Call into rspec to run the current set of tests
13-
# and then remove the example from the group which
14-
# if we dont will run test 1 then test 1,2 then test 1,2,3
15-
# and we'll get duplicate test results accordingly
16-
def run_rspec_test
17-
Spec::Runner.options.run_examples
18-
Spec::Runner.options.remove_example_group(Spec::Runner.options.example_groups[0])
19-
end
20-
21-
# Allow access to the current failure count from RSpec
22-
# which will let us change the tab color based on the test results
23-
def current_failure_count
24-
Spec::Runner.options.reporter.failure_count
25-
end
26-
27-
# def select_output_cell(c, f)
28-
# Spec::Runner.options.reporter.set_current_spreadsheet_cell(c,f)
29-
# end
30-
31-
# Iterate over spreadsheet cells, create the
32-
# test fixtures and call your test. Generally
33-
# you will need to iterate over the spreadsheet
34-
# cells and once you have the information you need
35-
# to actually run the rspec test you should
36-
# use:
37-
# select_output_cell(cell)
38-
# This tells the reporter which spreadsheet
39-
# cell should get the results
40-
# create_rspec_test(test_fixture, cell)
41-
# This is a method you create which will create
42-
# rspec testcase(s) based on the inputs
43-
# run_rspec_test
44-
# This will run the test set up by create_test
45-
def generate_rspec_tests
46-
end
47-
48-
# This is the guts of the rspec test you want to call
49-
# so for example something like
50-
#
51-
# describe 'test' do
52-
# before(:all) do
53-
# end
54-
# it "testcase 1" do
55-
# end
56-
# it "testcase 2" do
57-
# end
58-
# ... etc ...
59-
# after(:all) do
60-
# end
61-
# end
62-
def create_rspec_test(args)
63-
end
64-
65-
# This is called by the fixture before any test
66-
# is run on the worksheet so you can perform any
67-
# setup needed
68-
#def before_all
69-
#end
70-
71-
# This method is called before each set of tests
72-
# typically a row or column of tests or potentially
73-
# before each cell, depending on the fixture
74-
#def before_each
75-
#end
76-
77-
# This method is called after each set of tests
78-
# typically a row or column of tests or potentially
79-
# after each cell, depending on the fixture
80-
#def after_each
81-
#end
82-
83-
# This is called by the fixture after all tests
84-
# are run on the worksheet so you can perform any
85-
# teardown needed
86-
#def after_all
87-
#end
88-
89-
90-
# Store metrics as the fixture is running
91-
class Metrics
92-
attr_accessor :attribute_count, :method_count, :record_count
93-
def initialize
94-
reset_page_counts
95-
reset_record_counts
96-
end
97-
# Counts tracked on a worksheet scope
98-
def reset_page_counts
99-
@record_count = 0
100-
end
101-
# Counts tracked on a record scope
102-
def reset_record_counts
103-
@attribute_count = 0
104-
@method_count = 0
105-
end
106-
def inc(attribute_name)
107-
eval("@#{attribute_name.to_s} += 1")
108-
end
109-
end
110-
111-
end
112-
end
1+
module Rasta
2+
module Fixture
3+
4+
module BaseFixture
5+
include Rasta::Spreadsheet
6+
7+
def initialize_test_fixture(roo_reference)
8+
@oo = roo_reference
9+
@metrics = Metrics.new
10+
end
11+
12+
# Call into rspec to run the current set of tests
13+
# and then remove the example from the group which
14+
# if we dont will run test 1 then test 1,2 then test 1,2,3
15+
# and we'll get duplicate test results accordingly
16+
def run_rspec_test
17+
Spec::Runner.options.run_examples
18+
Spec::Runner.options.remove_example_group(Spec::Runner.options.example_groups[0])
19+
end
20+
21+
# Allow access to the current failure count from RSpec
22+
# which will let us change the tab color based on the test results
23+
def current_failure_count
24+
Spec::Runner.options.reporter.failure_count
25+
end
26+
27+
# def select_output_cell(c, f)
28+
# Spec::Runner.options.reporter.set_current_spreadsheet_cell(c,f)
29+
# end
30+
31+
# Iterate over spreadsheet cells, create the
32+
# test fixtures and call your test. Generally
33+
# you will need to iterate over the spreadsheet
34+
# cells and once you have the information you need
35+
# to actually run the rspec test you should
36+
# use:
37+
# select_output_cell(cell)
38+
# This tells the reporter which spreadsheet
39+
# cell should get the results
40+
# create_rspec_test(test_fixture, cell)
41+
# This is a method you create which will create
42+
# rspec testcase(s) based on the inputs
43+
# run_rspec_test
44+
# This will run the test set up by create_test
45+
def generate_rspec_tests
46+
end
47+
48+
# This is the guts of the rspec test you want to call
49+
# so for example something like
50+
#
51+
# describe 'test' do
52+
# before(:all) do
53+
# end
54+
# it "testcase 1" do
55+
# end
56+
# it "testcase 2" do
57+
# end
58+
# ... etc ...
59+
# after(:all) do
60+
# end
61+
# end
62+
def create_rspec_test(args)
63+
end
64+
65+
# This is called by the fixture before any test
66+
# is run on the worksheet so you can perform any
67+
# setup needed
68+
#def before_all
69+
#end
70+
71+
# This method is called before each set of tests
72+
# typically a row or column of tests or potentially
73+
# before each cell, depending on the fixture
74+
#def before_each
75+
#end
76+
77+
# This method is called after each set of tests
78+
# typically a row or column of tests or potentially
79+
# after each cell, depending on the fixture
80+
#def after_each
81+
#end
82+
83+
# This is called by the fixture after all tests
84+
# are run on the worksheet so you can perform any
85+
# teardown needed
86+
#def after_all
87+
#end
88+
89+
90+
# Store metrics as the fixture is running
91+
class Metrics
92+
attr_accessor :attribute_count, :method_count, :record_count
93+
def initialize
94+
reset_page_counts
95+
reset_record_counts
96+
end
97+
# Counts tracked on a worksheet scope
98+
def reset_page_counts
99+
@record_count = 0
100+
end
101+
# Counts tracked on a record scope
102+
def reset_record_counts
103+
@attribute_count = 0
104+
@method_count = 0
105+
end
106+
def inc(attribute_name)
107+
eval("@#{attribute_name.to_s} += 1")
108+
end
109+
end
110+
111+
end
112+
end
113113
end

rasta.gemspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Gem::Specification.new do |s|
1313
s.email = %q{[email protected]}
1414
s.executables = ["rasta"]
1515
s.extra_rdoc_files = ["README", "LICENSE"]
16-
s.files = ["bin/rasta", "lib/rasta", "lib/rasta/extensions", "lib/rasta/extensions/roo_extensions.rb", "lib/rasta/extensions/rspec_extensions.rb", "lib/rasta/fixture", "lib/rasta/fixture/base_fixture.rb", "lib/rasta/fixture/page_fixture.rb", "lib/rasta/fixture/rasta_fixture.rb", "lib/rasta/fixture/rspec_helpers.rb", "lib/rasta/fixture/table_fixture.rb", "lib/rasta/fixture_runner.rb", "lib/rasta/formatter", "lib/rasta/formatter/spreadsheet_formatter.rb", "lib/rasta/html.rb", "lib/rasta/spreadsheet.rb", "lib/rasta.rb", "spec/fixtures", "spec/fixtures/RastaTestFixture.rb", "spec/spreadsheets", "spec/spreadsheets/rasta_fixture.xls", "spec/spreadsheets/spreadsheet_parsing.xls", "spec/test_bookmarks.rb", "spec/test_fixtures.rb", "spec/test_spreadsheet.rb", "README", "LICENSE"]
16+
s.files = ["bin/rasta", "lib/rasta", "lib/rasta/extensions", "lib/rasta/extensions/roo_extensions.rb", "lib/rasta/extensions/rspec_extensions.rb", "lib/rasta/fixture", "lib/rasta/fixture/base_fixture.rb", "lib/rasta/fixture/page_fixture.rb", "lib/rasta/fixture/rasta_fixture.rb", "lib/rasta/fixture/rspec_helpers.rb", "lib/rasta/fixture/table_fixture.rb", "lib/rasta/fixture_runner.rb", "lib/rasta/formatter", "lib/rasta/formatter/spreadsheet_formatter.rb", "lib/rasta/html.rb", "lib/rasta/spreadsheet.rb", "lib/rasta.rb", "spec/base_fixture_spec.rb", "spec/bookmark_spec.rb", "spec/rasta_fixture_spec.rb", "spec/sandbox", "spec/sandbox/fixtures", "spec/sandbox/fixtures/RastaTestFixture.rb", "spec/sandbox/spreadsheets", "spec/sandbox/spreadsheets/rasta_fixture.xls", "spec/sandbox/spreadsheets/spreadsheet_parsing.xls", "spec/spec_helper.rb", "spec/spreadsheet_spec.rb", "README", "LICENSE"]
1717
s.has_rdoc = true
1818
s.homepage = %q{http://github.com/hmcgowan/rasta}
1919
s.rdoc_options = ["--main", "README", "--inline-source", "--charset=UTF-8"]

0 commit comments

Comments
 (0)