Sha256: 4a494608b6c1236cd578d79f7e0798b643c60af5a66e7a01e7634fb26ac8a680

Contents?: true

Size: 785 Bytes

Versions: 5

Compression:

Stored size: 785 Bytes

Contents

require "spec_helper"
require "bit_core"

describe BitPlayer::Navigator do
  let(:status) do
    double(
      "status",
      context: "a",
      module_position: 1,
      provider_position: 2,
      content_position: 3
    )
  end
  let(:participant) { double("participant", navigation_status: status) }
  let(:view_context) { double("context", current_participant: participant) }
  let(:provider) { double("provider") }
  let(:nav) { BitPlayer::Navigator.new(participant) }

  before do
    expect(BitCore::Tool).to receive(:find_by_title)
      .and_return(double("tool", id: 1))
  end

  describe "#render_current_content" do
    it "should render the content from the current provider" do
      expect(nav.render_current_content(view_context)).to match(/Oops/)
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
bit_player-0.4.4 spec/models/bit_player/navigator_spec.rb
bit_player-0.4.3 spec/models/bit_player/navigator_spec.rb
bit_player-0.4.2 spec/models/bit_player/navigator_spec.rb
bit_player-0.4.1 spec/models/bit_player/navigator_spec.rb
bit_player-0.4.0 spec/models/bit_player/navigator_spec.rb