Sha256: ccd3f0ed38d4aa0d5753858e7c627685a4e07c7909e3e8c6b38bf5075a8fb96a

Contents?: true

Size: 1.19 KB

Versions: 6

Compression:

Stored size: 1.19 KB

Contents

require 'spec_helper'

describe Picky::Backends::Backend do

  let(:backend) { described_class.new }

  # describe 'score' do
  #   it 'forwards to the parameter' do
  #     combinations = stub :combinations
  # 
  #     combinations.should_receive(:score).once.with()
  # 
  #     backend.score combinations
  #   end
  # end

  describe 'to_s' do
    it 'is correct' do
      backend.to_s.should == 'Picky::Backends::Backend'
    end
  end

  # describe 'extract_lambda_or' do
  #   it 'returns a given non-lambda' do
  #     backend.extract_lambda_or(:thing).should == :thing
  #   end
  #   it 'calls a given lambda with the given args' do
  #     lam = ->() do
  #       :lam
  #     end
  #
  #     backend.extract_lambda_or(lam).should == :lam
  #   end
  #   it 'calls a given lambda with the given args' do
  #     lam = ->(arg1) do
  #       arg1.should == 1
  #       :lam
  #     end
  #
  #     backend.extract_lambda_or(lam, 1).should == :lam
  #   end
  #   it 'calls a given lambda with the given args' do
  #     lam = ->(arg1, arg2) do
  #       arg1.should == 1
  #       arg2.should == 2
  #       :lam
  #     end
  #
  #     backend.extract_lambda_or(lam, 1, 2).should == :lam
  #   end
  # end

end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
picky-4.19.4 spec/lib/backends/backend_spec.rb
picky-4.19.3 spec/lib/backends/backend_spec.rb
picky-4.19.2 spec/lib/backends/backend_spec.rb
picky-4.19.1 spec/lib/backends/backend_spec.rb
picky-4.19.0 spec/lib/backends/backend_spec.rb
picky-4.18.0 spec/lib/backends/backend_spec.rb