Sha256: 27df059bcc8db1d59de5b4eaa8efc083046bcd338865c5fa2ddb335ac688193e

Contents?: true

Size: 657 Bytes

Versions: 32

Compression:

Stored size: 657 Bytes

Contents

require File.dirname(__FILE__) + '/spec_helper'

# give a model to play with
class Reply < ActiveRecord::Base
  attr_accessor :title
end

describe ActionView::Helpers do

  # NOTE gives deprication warning in RSpec 1.1.4:
  # Modules will no longer be automatically included in RSpec version 1.1.4.  Called from ./spec/i18n_label_spec.rb:15
  it "label should make a call to human_attribute_name" do
    Reply.should_receive(:human_attribute_name).with('title').and_return("translated title")
    reply = mock_model(Reply)
    fields_for(reply) do |f|
      f.label(:title).should == "<label for=\"reply_title\">translated title</label>"
    end
  end

end

Version data entries

32 entries across 32 versions & 3 rubygems

Version Path
russian-0.2.1 lib/vendor/i18n_label/spec/i18n_label_spec.rb
russian-0.0.8 lib/vendor/i18n_label/spec/i18n_label_spec.rb
russian-0.1.2 lib/vendor/i18n_label/spec/i18n_label_spec.rb
russian-0.2.0 lib/vendor/i18n_label/spec/i18n_label_spec.rb
russian-0.0.4 lib/vendor/i18n_label/spec/i18n_label_spec.rb
russian-0.0.7 lib/vendor/i18n_label/spec/i18n_label_spec.rb
russian-0.1.0 lib/vendor/i18n_label/spec/i18n_label_spec.rb
russian-0.1.3 lib/vendor/i18n_label/spec/i18n_label_spec.rb
russian-0.0.9 lib/vendor/i18n_label/spec/i18n_label_spec.rb
russian-0.1.1 lib/vendor/i18n_label/spec/i18n_label_spec.rb
russian-0.0.5 lib/vendor/i18n_label/spec/i18n_label_spec.rb
russian-0.0.6 lib/vendor/i18n_label/spec/i18n_label_spec.rb