<commit_before>require 'spec_helper'

describe 'jax:scaffold' do
  with_args "test_breaker" do
    it "should camelize model name" do
      subject.should generate("app/assets/jax/models/test_breaker.js.coffee") { |f|
        f.should =~ /TestBreaker/
      }
    end
    
    it "should camelize controller name" do
      subject.should generate("app/assets/jax/controllers/test_breaker_controller.js.coffee") { |f|
        f.should =~ /TestBreaker/
      }
    end
    
    it "should camelize names in controller spec" do
      subject.should generate("spec/javascripts/jax/controllers/test_breaker_controller_spec.js.coffee") { |f|
        f.should =~ /describe "TestBreakerController"/
        f.should =~ /redirectTo "test_breaker/
      }
    end
  end
  
  with_args "dungeon" do
    it "should generate dungeon model" do
      subject.should generate("spec/javascripts/jax/models/dungeon_spec.js.coffee")
    end

    it "should generate dungeon controller" do
      subject.should generate("app/assets/jax/controllers/dungeon_controller.js.coffee")
      subject.should generate("spec/javascripts/jax/controllers/dungeon_controller_spec.js.coffee")
    end
    
    it "should generate default dungeon resource" do
      subject.should generate("app/assets/jax/resources/dungeons/default.resource")
    end
    
    it "should generate dungeon material" do
      subject.should generate("app/assets/jax/resources/materials/dungeon.resource")
    end
    
    with_args "--without-coffeescript" do
      it "should generate dungeon model" do
        subject.should generate("app/assets/jax/models/dungeon.js")
        subject.should generate("spec/javascripts/jax/models/dungeon_spec.js")
      end

      it "should generate dungeon controller" do<commit_msg>whoops - restored an accidentally-deleted test...<commit_after>require 'spec_helper'

describe 'jax:scaffold' do
  with_args "test_breaker" do
    it "should camelize model name" do
      subject.should generate("app/assets/jax/models/test_breaker.js.coffee") { |f|
        f.should =~ /TestBreaker/
      }
    end
    
    it "should camelize controller name" do
      subject.should generate("app/assets/jax/controllers/test_breaker_controller.js.coffee") { |f|
        f.should =~ /TestBreaker/
      }
    end
    
    it "should camelize names in controller spec" do
      subject.should generate("spec/javascripts/jax/controllers/test_breaker_controller_spec.js.coffee") { |f|
        f.should =~ /describe "TestBreakerController"/
        f.should =~ /redirectTo "test_breaker/
      }
    end
  end
  
  with_args "dungeon" do
    it "should generate dungeon model" do
      subject.should generate("app/assets/jax/models/dungeon.js.coffee")
      subject.should generate("spec/javascripts/jax/models/dungeon_spec.js.coffee")
    end

    it "should generate dungeon controller" do
      subject.should generate("app/assets/jax/controllers/dungeon_controller.js.coffee")
      subject.should generate("spec/javascripts/jax/controllers/dungeon_controller_spec.js.coffee")
    end
    
    it "should generate default dungeon resource" do
      subject.should generate("app/assets/jax/resources/dungeons/default.resource")
    end
    
    it "should generate dungeon material" do
      subject.should generate("app/assets/jax/resources/materials/dungeon.resource")
    end
    
    with_args "--without-coffeescript" do
      it "should generate dungeon model" do
        subject.should generate("app/assets/jax/models/dungeon.js")
        subject.should generate("spec/javascripts/jax/models/dungeon_spec.js")
      end

      it "should generate dungeon controller" do
{'fraction_non_alphanumeric': 0.1020016451878256, 'fraction_numerical': 0.0, 'mean_word_length': 3.0805369127516777, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '7581148', 'n_tokens_mistral': 1141, 'n_tokens_neox': 1100, 'n_words': 231}