funky_form 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/.travis.yml ADDED
@@ -0,0 +1,4 @@
1
+ language: ruby
2
+ rvm:
3
+ - "1.9.3"
4
+ before_script: cd test/dummy && rake db:migrate && cd ../..
@@ -4,7 +4,7 @@ module FunkyForm
4
4
  if model_name
5
5
  @model_name = model_name
6
6
  else
7
- @model_name ||= super()
7
+ @model_name ||= superclass.model_name
8
8
  end
9
9
  end
10
10
 
@@ -1,3 +1,3 @@
1
1
  module FunkyForm
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
@@ -81,6 +81,16 @@ class FunkyFormTest < MiniTest::Unit::TestCase
81
81
  assert_equal "Order", form_class.model_name.to_s
82
82
  end
83
83
 
84
+ def test_model_inheritance
85
+ base_class = new_funky_form do
86
+ model "Order"
87
+ end
88
+
89
+ form_class = Class.new(base_class)
90
+
91
+ assert_equal "Order", form_class.model_name.to_s
92
+ end
93
+
84
94
  def test_validations
85
95
  form = new_funky_form do
86
96
  attribute :title, String
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: funky_form
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-01-13 00:00:00.000000000 Z
12
+ date: 2013-03-01 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  requirement: !ruby/object:Gem::Requirement
@@ -51,6 +51,7 @@ extensions: []
51
51
  extra_rdoc_files: []
52
52
  files:
53
53
  - .gitignore
54
+ - .travis.yml
54
55
  - Gemfile
55
56
  - README.rdoc
56
57
  - Rakefile
@@ -109,7 +110,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
109
110
  requirements:
110
111
  - - ! '>='
111
112
  - !ruby/object:Gem::Version
112
- hash: -865947392686571946
113
+ hash: -3061801009019637624
113
114
  version: '0'
114
115
  segments:
115
116
  - 0
@@ -118,7 +119,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
118
119
  requirements:
119
120
  - - ! '>='
120
121
  - !ruby/object:Gem::Version
121
- hash: -865947392686571946
122
+ hash: -3061801009019637624
122
123
  version: '0'
123
124
  segments:
124
125
  - 0