mirror of
https://github.com/drapergem/draper
synced 2023-03-27 23:21:17 -04:00
trailing whitespace
This commit is contained in:
parent
08718df5c4
commit
93191523ba
4 changed files with 14 additions and 15 deletions
4
Gemfile
4
Gemfile
|
@ -7,7 +7,7 @@ gem 'actionpack', "~> 3.1.3", :require => 'action_view'
|
|||
gem 'ammeter', '~> 0.2.2', :require => 'ammeter/init'
|
||||
gem 'guard'
|
||||
gem 'guard-rspec'
|
||||
gem 'launchy'
|
||||
gem 'launchy'
|
||||
gem 'yard'
|
||||
|
||||
gemspec
|
||||
gemspec
|
||||
|
|
16
Rakefile
16
Rakefile
|
@ -2,31 +2,31 @@ require 'bundler/gem_tasks'
|
|||
require 'rake'
|
||||
require 'rspec/core/rake_task'
|
||||
|
||||
RCOV = RUBY_VERSION.to_f == 1.8
|
||||
RCOV = RUBY_VERSION.to_f == 1.8
|
||||
|
||||
namespace :spec do
|
||||
|
||||
|
||||
RSpec::Core::RakeTask.new(:coverage) do |t|
|
||||
t.pattern = 'spec/**/*_spec.rb'
|
||||
|
||||
if RCOV
|
||||
|
||||
if RCOV
|
||||
t.rcov = true
|
||||
t.rcov_opts = '--exclude osx\/objc,spec,gems\/'
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
RSpec::Core::RakeTask.new(:normal) do |t|
|
||||
t.pattern ='spec/**/*_spec.rb'
|
||||
t.rcov = false
|
||||
end
|
||||
|
||||
|
||||
namespace :coverage do
|
||||
desc "Cleanup coverage data"
|
||||
task :cleanup do
|
||||
rm_rf 'coverage.data'
|
||||
rm_rf 'coverage'
|
||||
end
|
||||
|
||||
|
||||
desc "Browse the code coverage report."
|
||||
task :report => ["spec:coverage:cleanup", "spec:coverage"] do
|
||||
if RCOV
|
||||
|
@ -38,7 +38,7 @@ namespace :spec do
|
|||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
|
||||
desc "RSpec tests"
|
||||
|
|
|
@ -10,7 +10,7 @@ module Draper
|
|||
|
||||
argument :resource_name, :type => :string
|
||||
class_option "test-framework", :type => :string, :default => "rspec", :aliases => "-t", :desc => "Test framework to be invoked"
|
||||
|
||||
|
||||
source_root File.expand_path('../templates', __FILE__)
|
||||
|
||||
DECORATORS_ROOT = 'app/decorators/'
|
||||
|
@ -18,7 +18,7 @@ module Draper
|
|||
def build_model_decorator
|
||||
template 'decorator.rb', "#{DECORATORS_ROOT}#{resource_name.singularize}_decorator.rb"
|
||||
end
|
||||
#
|
||||
|
||||
def build_decorator_tests
|
||||
case options["test-framework"]
|
||||
when "rspec"
|
||||
|
|
|
@ -48,7 +48,6 @@ describe Draper::DecoratorGenerator do
|
|||
it { should contain "class ProductDecoratorTest < ActiveSupport::TestCase" }
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
||||
|
@ -63,7 +62,7 @@ end
|
|||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
context 'simple' do
|
||||
before { run_generator %w(products) }
|
||||
|
||||
|
@ -100,4 +99,4 @@ end
|
|||
it { should contain "describe ApplicationDecorator do" }
|
||||
end
|
||||
end
|
||||
=end
|
||||
=end
|
||||
|
|
Loading…
Add table
Reference in a new issue