Sha256: c9df94a03088b1cc5edd99f96459c428adb87d97f64a227f1a9e81bda443e58b

Contents?: true

Size: 524 Bytes

Versions: 14

Compression:

Stored size: 524 Bytes

Contents

require 'spec_helper'

describe ClosureTree::Support do
  let(:sut) { Tag._ct }
  it 'passes through table names without prefix and suffix' do
    expected = 'some_random_table_name'
    expect(sut.remove_prefix_and_suffix(expected)).to eq(expected)
  end
  it 'extracts through table name with prefix and suffix' do
    expected = 'some_random_table_name'
    tn = ActiveRecord::Base.table_name_prefix + expected + ActiveRecord::Base.table_name_suffix
    expect(sut.remove_prefix_and_suffix(tn)).to eq(expected)
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
closure_tree-6.6.0 spec/support_spec.rb
closure_tree-6.5.0 spec/support_spec.rb
closure_tree-6.4.0 spec/support_spec.rb
closure_tree-6.3.0 spec/support_spec.rb
closure_tree-6.2.0 spec/support_spec.rb
closure_tree-6.1.0 spec/support_spec.rb
closure_tree-6.0.0 spec/support_spec.rb
closure_tree-6.0.0.gamma spec/support_spec.rb
closure_tree-6.0.0.alpha spec/support_spec.rb
closure_tree-5.2.0 spec/support_spec.rb
closure_tree-5.1.1 spec/support_spec.rb
closure_tree-5.1.0 spec/support_spec.rb
closure_tree-5.0.0 spec/support_spec.rb
closure_tree-4.6.3 spec/support_spec.rb