Sha256: fba2852b4556235f98e5f53f023cd68f9d67be2465c54d8f925cfe070f159f7e

Contents?: true

Size: 696 Bytes

Versions: 2

Compression:

Stored size: 696 Bytes

Contents

# frozen_string_literal: true

require 'spec_helper'

describe TableBeet::Step do
  let(:step) do
    TableBeet::Loader.new(path: FIXTURES_PATH).load
    TableBeet::World.scopes[:turnip].first
  end

  describe '#id' do
    it 'should return method id' do
      expect(step.id).to be_instance_of(Integer).or be_instance_of(Fixnum)
    end
  end

  describe '#source' do
    it 'should return step source' do
      expect(step.source).to include('expect(name).to eq("Kuririn")')
    end
  end

  describe '#location' do
    it 'should return location of source' do
      expect(step.location).to include('global_steps.rb:3')
      expect(step.location).to include(FIXTURES_PATH)
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
table_beet2-0.0.5 spec/step_spec.rb
table_beet2-0.0.4 spec/step_spec.rb