Sha256: 858140096212ace89c40c9ea338b7a9aea93706f67868c6e97ccc794afb9603f
Contents?: true
Size: 705 Bytes
Versions: 1
Compression:
Stored size: 705 Bytes
Contents
require "spec_helper" describe Redisrank::Options do before(:each) do @helper = OptionsHelper.new @helper.parse_options(:wtf => 'dude', :foo => 'booze') end it "should #parse_options" do @helper.options[:hello].should == 'world' @helper.options[:foo].should == 'booze' @helper.options[:wtf].should == 'dude' @helper.raw_options.should_not have_key(:hello) end it "should create option_accessors" do @helper.hello.should == 'world' @helper.hello('woooo') @helper.hello.should == 'woooo' end end class OptionsHelper include Redisrank::Options option_accessor :hello def default_options { :hello => 'world', :foo => 'bar' } end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
redisrank-0.1.0 | spec/options_spec.rb |