Sha256: f4617f539ef404fc1a62a0b089f5b647ee3f40829460f1c6de98c47785a21453

Contents?: true

Size: 606 Bytes

Versions: 3

Compression:

Stored size: 606 Bytes

Contents

require 'great_pretender/mockup'
require_relative '../../support/mockup_helpers'

describe GreatPretender::Mockup do

  include MockupHelpers

  let(:mockup) { mockup_locator.mockups.find {|m| m.slug =~ /admin/ } }

  it "returns a human-readable name from its slug" do
    expect(mockup.name).to eq("Admin > Index")
  end

  context ".to_param" do
    it "returns the slug" do
      expect(mockup.to_param).to eq(mockup.slug)
    end
  end

  context ".updated_at" do
    it "returns the template file's mtime for its slug" do
      expect(mockup.updated_at).to eq(Time.at(1407427839))
    end
  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
great_pretender-0.1.1 spec/lib/great_pretender/mockup_spec.rb
great_pretender-0.0.2 spec/lib/great_pretender/mockup_spec.rb
great_pretender-0.0.1 spec/lib/great_pretender/mockup_spec.rb