module Fitting
Constants
- VERSION
Public Class Methods
configuration()
click to toggle source
# File lib/fitting.rb, line 14 def configuration @configuration ||= Configuration.craft end
configure() { |configuration| ... }
click to toggle source
# File lib/fitting.rb, line 10 def configure yield configuration end
load_tasks()
click to toggle source
# File lib/fitting.rb, line 62 def self.load_tasks return if loaded_tasks self.loaded_tasks = true Dir[File.join(File.dirname(__FILE__), 'tasks', '**/*.rake')].each do |rake| load rake end end
loaded_tasks()
click to toggle source
# File lib/fitting.rb, line 58 def self.loaded_tasks @loaded_tasks end
loaded_tasks=(val)
click to toggle source
# File lib/fitting.rb, line 54 def self.loaded_tasks=(val) @loaded_tasks = val end
save_test_data()
click to toggle source
# File lib/fitting.rb, line 33 def save_test_data responses = Fitting::Storage::Responses.new FileUtils.rm_r Dir.glob("fitting_tests/*"), :force => true RSpec.configure do |config| config.after(:each, type: :request) do responses.add(response, inspect) end config.after(:each, type: :controller) do responses.add(response, inspect) end config.after(:suite) do responses.tests.save end end end
statistics()
click to toggle source
# File lib/fitting.rb, line 18 def statistics puts 'DEPRECATED: deprecated method statistics, use new method save_test_data' responses = Fitting::Storage::Responses.new RSpec.configure do |config| config.after(:each, type: :controller) do responses.add(response, inspect) end config.after(:suite) do responses.statistics.save end end end