<commit_before>require 'spec_helper'

require 'classes/backend_model'
require 'classes/read_only_model'

describe DataMapper::Is::ReadOnly do
  it "should define a VERSION constant" do
    DataMapper::Is::ReadOnly.const_defined?('VERSION').should == true
  end

  context "auto_migrate!" do
    before(:all) do
      BackendModel.auto_migrate!

      ('a'..'z').each do |value|
        BackendModel.create(:value => value)
      end

      ReadOnlyModel.auto_migrate!
    end

    it "should not destroy the contents of the storage table" do
      ReadOnlyModel.all.length.should == 26
    end

    it "should still return true" do
      (ReadOnlyModel.auto_migrate!).should == true
    end
  end

  context "auto_upgrade!" do
  end

  context "immutable" do
    before(:all) do
      BackendModel.auto_migrate!
      BackendModel.create(:value => 'x')
<commit_msg>Removed an old spec.<commit_after>require 'spec_helper'

require 'classes/backend_model'
require 'classes/read_only_model'

describe DataMapper::Is::ReadOnly do
  context "auto_migrate!" do
    before(:all) do
      BackendModel.auto_migrate!

      ('a'..'z').each do |value|
        BackendModel.create(:value => value)
      end

      ReadOnlyModel.auto_migrate!
    end

    it "should not destroy the contents of the storage table" do
      ReadOnlyModel.all.length.should == 26
    end

    it "should still return true" do
      (ReadOnlyModel.auto_migrate!).should == true
    end
  end

  context "auto_upgrade!" do
  end

  context "immutable" do
    before(:all) do
      BackendModel.auto_migrate!
      BackendModel.create(:value => 'x')

{'fraction_non_alphanumeric': 0.1038961038961039, 'fraction_numerical': 0.0024737167594310453, 'mean_word_length': 3.1808785529715764, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4132773', 'n_tokens_mistral': 520, 'n_tokens_neox': 514, 'n_words': 131}