enju_nii 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -36,5 +36,12 @@ Rake::TestTask.new(:test) do |t|
36
36
  t.verbose = false
37
37
  end
38
38
 
39
+ require 'rspec/core'
40
+ require 'rspec/core/rake_task'
39
41
 
40
- task :default => :test
42
+ RSpec::Core::RakeTask.new(:spec) do |spec|
43
+ spec.pattern = FileList['spec/**/*_spec.rb']
44
+ end
45
+
46
+
47
+ task :default => :spec
@@ -3,6 +3,6 @@ require 'cancan'
3
3
  require 'inherited_resources'
4
4
 
5
5
  module EnjuNii
6
- class Engine < Rails::Engine
6
+ class Engine < ::Rails::Engine
7
7
  end
8
8
  end
@@ -1,3 +1,3 @@
1
1
  module EnjuNii
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
@@ -0,0 +1,5 @@
1
+ FactoryGirl.define do
2
+ factory :nii_type do |f|
3
+ f.sequence(:name){|n| "nii_type_#{n}"}
4
+ end
5
+ end
data/spec/spec_helper.rb CHANGED
@@ -1,22 +1,21 @@
1
1
  # This file is copied to spec/ when you run 'rails generate rspec:install'
2
2
  ENV["RAILS_ENV"] ||= 'test'
3
- require File.expand_path("../dummy/config/environment", __FILE__)
3
+ require File.expand_path("../../config/environment", __FILE__)
4
4
  require 'rspec/rails'
5
- require 'factory_girl'
5
+ require 'rspec/autorun'
6
6
 
7
7
  # Requires supporting ruby files with custom matchers and macros, etc,
8
8
  # in spec/support/ and its subdirectories.
9
- Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
9
+ Dir[Rails.root.join("spec/support/**/*.rb")].each {|f| require f}
10
10
 
11
11
  RSpec.configure do |config|
12
- # == Mock Framework
12
+ # ## Mock Framework
13
13
  #
14
14
  # If you prefer to use mocha, flexmock or RR, uncomment the appropriate line:
15
15
  #
16
16
  # config.mock_with :mocha
17
17
  # config.mock_with :flexmock
18
18
  # config.mock_with :rr
19
- config.mock_with :rspec
20
19
 
21
20
  # Remove this line if you're not using ActiveRecord or ActiveRecord fixtures
22
21
  config.fixture_path = "#{::Rails.root}/../../spec/fixtures"
@@ -26,7 +25,10 @@ RSpec.configure do |config|
26
25
  # instead of true.
27
26
  config.use_transactional_fixtures = true
28
27
 
29
- config.extend ControllerMacros, :type => :controller
28
+ # If true, the base class of anonymous controllers will be inferred
29
+ # automatically. This will be the default behavior in future versions of
30
+ # rspec-rails.
31
+ config.infer_base_class_for_anonymous_controllers = false
30
32
  end
31
33
 
32
34
  FactoryGirl.definition_file_paths << "#{::Rails.root}/../../spec/factories"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: enju_nii
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -160,13 +160,13 @@ files:
160
160
  - spec/dummy/config/routes.rb
161
161
  - spec/dummy/config.ru
162
162
  - spec/dummy/lib/master_model.rb
163
- - spec/dummy/log/test.log
164
163
  - spec/dummy/public/404.html
165
164
  - spec/dummy/public/422.html
166
165
  - spec/dummy/public/500.html
167
166
  - spec/dummy/public/favicon.ico
168
167
  - spec/dummy/Rakefile
169
168
  - spec/dummy/script/rails
169
+ - spec/factories/nii_type.rb
170
170
  - spec/spec_helper.rb
171
171
  - spec/support/controller_macros.rb
172
172
  - spec/support/devise.rb
@@ -217,13 +217,13 @@ test_files:
217
217
  - spec/dummy/config/routes.rb
218
218
  - spec/dummy/config.ru
219
219
  - spec/dummy/lib/master_model.rb
220
- - spec/dummy/log/test.log
221
220
  - spec/dummy/public/404.html
222
221
  - spec/dummy/public/422.html
223
222
  - spec/dummy/public/500.html
224
223
  - spec/dummy/public/favicon.ico
225
224
  - spec/dummy/Rakefile
226
225
  - spec/dummy/script/rails
226
+ - spec/factories/nii_type.rb
227
227
  - spec/spec_helper.rb
228
228
  - spec/support/controller_macros.rb
229
229
  - spec/support/devise.rb
File without changes