Sha256: ef0759fb83d5f49ce7b34f8d7d5f08dd177a7703e15e176b63b3315c0469d11d

Contents?: true

Size: 1011 Bytes

Versions: 5

Compression:

Stored size: 1011 Bytes

Contents

require File.expand_path('../../spec_helper', __FILE__)

describe "Make Exportable Helper" do

  before(:each) do
    clean_database!
  end

  it "it should output an array of exportable classes" do
    MakeExportable.exportable_classes = {}
    User.class_eval("make_exportable")
    Post.class_eval("make_exportable")
    MakeExportableHelper.exportable_class_list.should == ["Post", "User"]
    MakeExportable.exportable_classes = {}
  end

  it "it should output an array of exportable tables" do
    User.class_eval("make_exportable")
    Post.class_eval("make_exportable")
    MakeExportableHelper.exportable_table_list.should ==["posts", "users"]
    MakeExportable.exportable_classes = {}
  end
  
  it "it should output an array of exportable classes and tables to check against" do
    User.class_eval("make_exportable")
    Post.class_eval("make_exportable")
    MakeExportableHelper.exportable_units.should == {User => "users", Post => "posts"}
    MakeExportable.exportable_classes = {}
  end

end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
make_exportable-1.1.0 spec/make_exportable/make_exportable_helper_spec.rb
make_exportable-1.0.3 spec/make_exportable/make_exportable_helper_spec.rb
make_exportable-1.0.2 spec/make_exportable/make_exportable_helper_spec.rb
make_exportable-1.0.1 spec/make_exportable/make_exportable_helper_spec.rb
make_exportable-1.0.0 spec/make_exportable/make_exportable_helper_spec.rb