Sha256: 1e5f7f2adc288db1f244765df80d4aeb7eead9c4db76028f83d78ad42a2513c9
Contents?: true
Size: 1.26 KB
Versions: 5
Compression:
Stored size: 1.26 KB
Contents
require 'rubygems' require 'spec' require 'mash' require 'yaml' require File.join(File.dirname(__FILE__), "..", "..", "lib", "videojuicer") require File.join(File.dirname(__FILE__), "..", "shared", "configurable_spec") require File.join(File.dirname(__FILE__), "..", "shared", "resource_spec") module SpecHelper def configure_test_settings(overrides={}) Videojuicer.configure!({ :consumer_key => nil, :consumer_secret => nil, :api_version => 1, :protocol => "http", :host => "localhost", :port => 5555 }.merge(overrides)) end def fixtures @fixtures ||= Mash.new(YAML.load(File.open(File.join(File.dirname(__FILE__), "..", "..", "core-fixtures.yml")).read)) end def cycle_attributes(attrs) r = rand(99999) attrs.inject({}) do |memo, (key, value)| memo.merge({ key => if value.respond_to?(:read) value elsif value.is_a?(Date) or value.is_a?(DateTime) or value.is_a?(Time) value else value.to_s.gsub(/\d+/, r.to_s) end }) end end def strip_files(attrs) end end Spec::Runner.configure do |config| config.include(SpecHelper) end
Version data entries
5 entries across 5 versions & 1 rubygems