mattscilipoti-model_steps 0.3.5 → 0.3.6

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/.gitignore CHANGED
@@ -1,6 +1,7 @@
1
1
  *.sw?
2
2
  .DS_Store
3
3
 
4
+ .bundle
4
5
  .rvmrc
5
6
  .yardoc
6
7
  doc
data/Gemfile ADDED
@@ -0,0 +1,3 @@
1
+ source "http://rubygems.org"
2
+
3
+ gemspec
data/Gemfile.lock ADDED
@@ -0,0 +1,38 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ mattscilipoti-model_steps (0.3.5)
5
+ aaronh-chronic (~> 0.3.9)
6
+ friendly_id (~> 3.0)
7
+
8
+ GEM
9
+ remote: http://rubygems.org/
10
+ specs:
11
+ aaronh-chronic (0.3.9)
12
+ babosa (0.2.0)
13
+ builder (2.1.2)
14
+ cucumber (0.9.2)
15
+ builder (~> 2.1.2)
16
+ diff-lcs (~> 1.1.2)
17
+ gherkin (~> 2.2.5)
18
+ json (~> 1.4.6)
19
+ term-ansicolor (~> 1.0.5)
20
+ diff-lcs (1.1.2)
21
+ friendly_id (3.1.7)
22
+ babosa (~> 0.2.0)
23
+ gherkin (2.2.9)
24
+ json (~> 1.4.6)
25
+ term-ansicolor (~> 1.0.5)
26
+ json (1.4.6)
27
+ micronaut (0.3.0)
28
+ term-ansicolor (1.0.5)
29
+
30
+ PLATFORMS
31
+ ruby
32
+
33
+ DEPENDENCIES
34
+ aaronh-chronic (~> 0.3.9)
35
+ cucumber
36
+ friendly_id (~> 3.0)
37
+ mattscilipoti-model_steps!
38
+ micronaut
data/Rakefile CHANGED
@@ -11,7 +11,7 @@ begin
11
11
  gem.homepage = "http://github.com/mattscilipoti/mattscilipoti-model_steps"
12
12
  gem.authors = ["Matt Scilipoti", "Chris Cahoon"]
13
13
  gem.add_runtime_dependency "friendly_id", '~> 3.0'
14
- gem.add_runtime_dependency "chronic", '~> 0.2'
14
+ gem.add_runtime_dependency "aaronh-chronic", '~> 0.3.9'
15
15
  gem.add_development_dependency "micronaut"
16
16
  gem.add_development_dependency "cucumber"
17
17
  # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.5
1
+ 0.3.6
@@ -1,3 +1,4 @@
1
+ require 'rubygems'
1
2
  require 'chronic'
2
3
 
3
4
  Cucumber::Ast::Table.class_eval do
@@ -45,7 +46,7 @@ end
45
46
 
46
47
  Then /^I should see (\d+) (\D+)$/ do |expected_count, requested_model|
47
48
  expected_count = expected_count.to_i
48
- css_class = requested_model.underscore
49
+ css_class = css_classify(requested_model)
49
50
  if expected_count > 0
50
51
  response.should have_tag("table.#{css_class}") do
51
52
  with_tag("tbody tr", expected_count)
@@ -67,7 +68,7 @@ Then /^I should see (?:these|this|the following) (\D+):$/ do |requested_model, t
67
68
 
68
69
  requested_table = (requested_model =~ /^(.+)[(](.+)[)]$/) ? $1 : requested_model
69
70
 
70
- css_class = requested_table.pluralize.underscore
71
+ css_class = css_classify(requested_table)
71
72
 
72
73
  #TODO: yell if table does not exist
73
74
  html_table = table(tableish("table.#{css_class} tr", 'td,th'))
@@ -706,6 +707,9 @@ def requested_model_to_model(requested_model)
706
707
  raise "Requested Model (#{requested_model}, as #{possible_model_name}) is not supported."
707
708
  end
708
709
 
710
+ def css_classify(requested_model)
711
+ requested_model.pluralize.parameterize.underscore
712
+ end
709
713
 
710
714
  def requested_params_to_model_params(requested_params, model)
711
715
  converted_params = {}
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{mattscilipoti-model_steps}
8
- s.version = "0.3.5"
8
+ s.version = "0.3.6"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Matt Scilipoti", "Chris Cahoon"]
12
- s.date = %q{2010-10-20}
12
+ s.date = %q{2010-10-22}
13
13
  s.description = %q{Step Definitions for cucumber which support ActiveRecord Models}
14
14
  s.email = %q{matt@scilipoti.name}
15
15
  s.extra_rdoc_files = [
@@ -19,6 +19,8 @@ Gem::Specification.new do |s|
19
19
  s.files = [
20
20
  ".document",
21
21
  ".gitignore",
22
+ "Gemfile",
23
+ "Gemfile.lock",
22
24
  "LICENSE",
23
25
  "README.rdoc",
24
26
  "Rakefile",
@@ -31,7 +33,8 @@ Gem::Specification.new do |s|
31
33
  "lib/mattscilipoti-model_steps.rb",
32
34
  "lib/model_steps/step_definitions.rb",
33
35
  "mattscilipoti-model_steps-0.3.4.gem",
34
- "mattscilipoti-model_steps.gemspec"
36
+ "mattscilipoti-model_steps.gemspec",
37
+ "test/test_step_definition.rb"
35
38
  ]
36
39
  s.homepage = %q{http://github.com/mattscilipoti/mattscilipoti-model_steps}
37
40
  s.rdoc_options = ["--charset=UTF-8"]
@@ -39,7 +42,8 @@ Gem::Specification.new do |s|
39
42
  s.rubygems_version = %q{1.3.7}
40
43
  s.summary = %q{Model Steps for cucumber}
41
44
  s.test_files = [
42
- "examples/example_helper.rb",
45
+ "test/test_step_definition.rb",
46
+ "examples/example_helper.rb",
43
47
  "examples/mattscilipoti-model_steps_example.rb"
44
48
  ]
45
49
 
@@ -49,18 +53,18 @@ Gem::Specification.new do |s|
49
53
 
50
54
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
51
55
  s.add_runtime_dependency(%q<friendly_id>, ["~> 3.0"])
52
- s.add_runtime_dependency(%q<chronic>, ["~> 0.2"])
56
+ s.add_runtime_dependency(%q<aaronh-chronic>, ["~> 0.3.9"])
53
57
  s.add_development_dependency(%q<micronaut>, [">= 0"])
54
58
  s.add_development_dependency(%q<cucumber>, [">= 0"])
55
59
  else
56
60
  s.add_dependency(%q<friendly_id>, ["~> 3.0"])
57
- s.add_dependency(%q<chronic>, ["~> 0.2"])
61
+ s.add_dependency(%q<aaronh-chronic>, ["~> 0.3.9"])
58
62
  s.add_dependency(%q<micronaut>, [">= 0"])
59
63
  s.add_dependency(%q<cucumber>, [">= 0"])
60
64
  end
61
65
  else
62
66
  s.add_dependency(%q<friendly_id>, ["~> 3.0"])
63
- s.add_dependency(%q<chronic>, ["~> 0.2"])
67
+ s.add_dependency(%q<aaronh-chronic>, ["~> 0.3.9"])
64
68
  s.add_dependency(%q<micronaut>, [">= 0"])
65
69
  s.add_dependency(%q<cucumber>, [">= 0"])
66
70
  end
@@ -0,0 +1,10 @@
1
+ require 'test/unit'
2
+ require File.expand_path('../../lib/model_steps/step_definitions', __FILE__)
3
+
4
+ #pending: requires cucumber world.
5
+ #TODO: move to helper type file.
6
+ #class TestStepDefinition < Test::Unit::TestCase
7
+ # def test_css_classify_should_pluralize_and_underscore
8
+ # assert_equal 'test_model', css_classify("Test Model")
9
+ # end
10
+ #end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mattscilipoti-model_steps
3
3
  version: !ruby/object:Gem::Version
4
- hash: 25
4
+ hash: 31
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 3
9
- - 5
10
- version: 0.3.5
9
+ - 6
10
+ version: 0.3.6
11
11
  platform: ruby
12
12
  authors:
13
13
  - Matt Scilipoti
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2010-10-20 00:00:00 -04:00
19
+ date: 2010-10-22 00:00:00 -04:00
20
20
  default_executable:
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency
@@ -35,18 +35,19 @@ dependencies:
35
35
  type: :runtime
36
36
  version_requirements: *id001
37
37
  - !ruby/object:Gem::Dependency
38
- name: chronic
38
+ name: aaronh-chronic
39
39
  prerelease: false
40
40
  requirement: &id002 !ruby/object:Gem::Requirement
41
41
  none: false
42
42
  requirements:
43
43
  - - ~>
44
44
  - !ruby/object:Gem::Version
45
- hash: 15
45
+ hash: 1
46
46
  segments:
47
47
  - 0
48
- - 2
49
- version: "0.2"
48
+ - 3
49
+ - 9
50
+ version: 0.3.9
50
51
  type: :runtime
51
52
  version_requirements: *id002
52
53
  - !ruby/object:Gem::Dependency
@@ -89,6 +90,8 @@ extra_rdoc_files:
89
90
  files:
90
91
  - .document
91
92
  - .gitignore
93
+ - Gemfile
94
+ - Gemfile.lock
92
95
  - LICENSE
93
96
  - README.rdoc
94
97
  - Rakefile
@@ -102,6 +105,7 @@ files:
102
105
  - lib/model_steps/step_definitions.rb
103
106
  - mattscilipoti-model_steps-0.3.4.gem
104
107
  - mattscilipoti-model_steps.gemspec
108
+ - test/test_step_definition.rb
105
109
  has_rdoc: true
106
110
  homepage: http://github.com/mattscilipoti/mattscilipoti-model_steps
107
111
  licenses: []
@@ -137,5 +141,6 @@ signing_key:
137
141
  specification_version: 3
138
142
  summary: Model Steps for cucumber
139
143
  test_files:
144
+ - test/test_step_definition.rb
140
145
  - examples/example_helper.rb
141
146
  - examples/mattscilipoti-model_steps_example.rb