Sha256: d558752477ede5dc4b19769906400172d30dbd523e49b4c5b766707765849214

Contents?: true

Size: 570 Bytes

Versions: 2

Compression:

Stored size: 570 Bytes

Contents

require 'spec_helper'

describe "BonaFide::Constraint" do
  before(:all) { require 'bona_fide' }

  before(:all) {
    intialize_default_configuration
  }

  it "should initialize with getter" do
    expect { BonaFide::Constraint.new(:getter) }.not_to raise_error
  end

  it "should return true for true" do
    constraint = BonaFide::Constraint.new(:true_method)
    constraint.matches?(nil).should be(true)
  end

  it "should return false for false" do
    constraint = BonaFide::Constraint.new(:false_method)
    constraint.matches?(nil).should be(false)
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
bona_fide-0.1.1 spec/bona_fide/constraints_spec.rb
bona_fide-0.1.0 spec/bona_fide/constraints_spec.rb