Sha256: 5dcee7cb2ec69a124b9664e31cc26486825cd7ed4492db9870db1bfdb09d9636

Contents?: true

Size: 574 Bytes

Versions: 4

Compression:

Stored size: 574 Bytes

Contents

require 'spec_helper'

class Parameters
  include Controll::Helper::Params

  attr_reader :params

  def initialize params = nil
    @params = params || {name: 'kris', shoe_size: 43, gender: 'male' }
  end
end

describe Controll::Helper::Params do

  subject { clazz.new }
  let(:clazz) { Parameters }

  describe '.param_methods *args' do
    before :all do
      clazz.param_methods :name, :shoe_size
      clazz.param_method  :gender
    end

    its(:name)      { should == 'kris' }
    its(:shoe_size) { should == 43 }
    its(:gender)    { should == 'male' }
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
controll-0.3.2 spec/controll/helper/params_spec.rb
controll-0.3.1 spec/controll/helper/params_spec.rb
controll-0.3.0 spec/controll/helper/params_spec.rb
controll-0.2.0 spec/controll/helper/params_spec.rb