Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

48 lines (36 sloc) 1.09 kB
$:.unshift(File.expand_path('../../lib', __FILE__))
require 'pathname'
require 'logger'
root_path = Pathname(__FILE__).dirname.join('..').expand_path
lib_path = root_path.join('lib')
log_path = root_path.join('log')
log_path.mkpath
require 'rubygems'
require 'bundler'
Bundler.require(:default, :test)
require 'flipper'
Logger.new(log_path.join('test.log'))
RSpec.configure do |config|
config.filter_run :focused => true
config.alias_example_to :fit, :focused => true
config.alias_example_to :xit, :pending => true
config.run_all_when_everything_filtered = true
config.before(:each) do
Flipper.groups = nil
Timecop.return
end
end
shared_examples_for 'a percentage' do
it "initializes with value" do
percentage = described_class.new(12)
percentage.should be_instance_of(described_class)
end
it "converts string values to integers when initializing" do
percentage = described_class.new('15')
percentage.value.should eq(15)
end
it "has a value" do
percentage = described_class.new(19)
percentage.value.should eq(19)
end
end
Jump to Line
Something went wrong with that request. Please try again.