Sha256: 91a6e56d8f73267ed6c0d751c80d344fd53dce9f9cbc5985bdb2a369efc32ca6

Contents?: true

Size: 503 Bytes

Versions: 2

Compression:

Stored size: 503 Bytes

Contents

require 'spec_helper'

describe Tarquinn::Condition::ProcRunner do
  let(:controller) { double }
  let(:value) { true }
  let(:subject) { described_class.new { value } }

  describe '#check?' do
    context 'when block evaluates into true' do
      it do
        expect(subject.check?(controller)).to be_truthy
      end
    end

    context 'when block evaluates into false' do
      let(:value) { false }
      it do
        expect(subject.check?(controller)).to be_falsey
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
tarquinn-0.2.0 spec/lib/tarquinn/condition/proc_runner_spec.rb
tarquinn-0.1.0 spec/lib/tarquinn/condition/proc_runner_spec.rb