Sha256: a95219dd44c4232b52fe721aadd12df9f8565fe38abe1aa146d6e3079e62f9be

Contents?: true

Size: 1.03 KB

Versions: 10

Compression:

Stored size: 1.03 KB

Contents

require 'spec_helper'

describe "translations/new" do
  before(:each) do
    assign(:translation, stub_model(Translation,
      :locale => "MyString",
      :key_hash => "MyString",
      :key => "MyText",
      :value => "MyText",
      :interpolations => "MyText",
      :is_proc => false
    ).as_new_record)
  end

  it "renders new translation form" do
    render

    # Run the generator again with the --webrat flag if you want to use webrat matchers
    assert_select "form", :action => translations_path, :method => "post" do
      assert_select "input#translation_locale", :name => "translation[locale]"
      assert_select "input#translation_key_hash", :name => "translation[key_hash]"
      assert_select "textarea#translation_key", :name => "translation[key]"
      assert_select "textarea#translation_value", :name => "translation[value]"
      assert_select "textarea#translation_interpolations", :name => "translation[interpolations]"
      assert_select "input#translation_is_proc", :name => "translation[is_proc]"
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
kuztuscms-0.0.10 spec/views/kuztuscms/translations/new.html.erb_spec.rb
kuztuscms-0.0.9 spec/views/kuztuscms/translations/new.html.erb_spec.rb
kuztuscms-0.0.8 spec/views/kuztuscms/translations/new.html.erb_spec.rb
kuztuscms-0.0.7 spec/views/kuztuscms/translations/new.html.erb_spec.rb
kuztuscms-0.0.6 spec/views/kuztuscms/translations/new.html.erb_spec.rb
kuztuscms-0.0.5 spec/views/kuztuscms/translations/new.html.erb_spec.rb
kuztuscms-0.0.4 spec/views/kuztuscms/translations/new.html.erb_spec.rb
kuztuscms-0.0.3 spec/views/kuztuscms/translations/new.html.erb_spec.rb
kuztuscms-0.0.2 spec/views/kuztuscms/translations/new.html.erb_spec.rb
kuztuscms-0.0.1 spec/views/kuztuscms/translations/new.html.erb_spec.rb