Sha256: a43a6147e494d2c143c06637a37e379461e9443256e066246dc76454d445c485

Contents?: true

Size: 540 Bytes

Versions: 3

Compression:

Stored size: 540 Bytes

Contents

require 'spec_helper'

describe Fierce::PresenterFinder do
  let(:fixture_presenter_path) { File.dirname(__FILE__) + "/custom_presenters" }
  before do
    Rails.stub(:root).and_return(File.dirname(__FILE__))
    Fierce.clear_paths
    Fierce.add_path(fixture_presenter_path)
  end

  let(:finder) { Fierce::PresenterFinder.new('home/index') }

  it "requires the file" do
    finder.perform
    defined?(CustomPresenters).should be_true
  end

  it "return the class" do
    finder.perform.should == CustomPresenters::Home::Index
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
fierce-0.1.2 spec/presenter_finder_spec.rb
fierce-0.1.1 spec/presenter_finder_spec.rb
fierce-0.1.0 spec/presenter_finder_spec.rb