Sha256: 5f3eb3a40b41a8c16abddf46b682a575b626e51056c6e2634e79793e53de603f

Contents?: true

Size: 1.11 KB

Versions: 1

Compression:

Stored size: 1.11 KB

Contents

require "spec_helper"

describe "ThemesForRails::CommonMethods" do
  before :all do
    @common = Object.new
    @common.extend ThemesForRails::CommonMethods
    @common.theme_name = "awesome"
    ThemesForRails.config.clear
  end

  it 'should use config themes_dir to build theme views path' do
    ThemesForRails.config.themes_dir = 'skinner'
    @common.send(:views_path_for, 'skinner').should match(/skinner\/views/)
  end

  it 'should use config themes_dir to build theme javascripts assets path' do
    ThemesForRails.config.themes_dir = 'skinner'
    @common.send(:assets_path_for, 'skinner', :javascripts).should match(/skinner\/assets\/javascripts/)
  end

  it 'should use config themes_dir to build theme stylesheets assets path' do
    ThemesForRails.config.themes_dir = 'skinner'
    @common.send(:assets_path_for, 'skinner', :stylesheets).should match(/skinner\/assets\/stylesheets/)
  end
  
  it 'should use config themes_dir to build theme images assets path' do
    ThemesForRails.config.themes_dir = 'skinner'
    @common.send(:assets_path_for, 'skinner', :images).should match(/skinner\/assets\/images/)
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
themes_for_rails-1.0.0rc1 spec/lib/common_methods_spec.rb