OSDN Git Service

t#29061/t#29089/t#29076:add mylist. modify panel picture
[pettanr/pettanr.git] / spec / models / license_group_spec.rb
index 46a225f..8279cfb 100644 (file)
@@ -16,13 +16,13 @@ describe LicenseGroup do
     end
     
     it 'オーソドックスなデータなら通る' do
-      @lg = Factory.build :license_group
+      @lg = FactoryGirl.build :license_group
       @lg.should be_valid
     end
     
     context 'nameを検証するとき' do
       before do
-        @lg = Factory.build :license_group
+        @lg = FactoryGirl.build :license_group
       end
       it 'テストデータの確認' do
         @lg.name = 'a'*50
@@ -37,13 +37,13 @@ describe LicenseGroup do
         @lg.should_not be_valid
       end
       it '重複していたら失敗する' do
-        l = Factory :license_group
+        l = FactoryGirl.create :license_group
         @lg.should_not be_valid
       end
     end
     context 'classnameを検証するとき' do
       before do
-        @lg = Factory.build :license_group
+        @lg = FactoryGirl.build :license_group
       end
       it 'テストデータの確認' do
         @lg.classname = 'a'*50
@@ -60,7 +60,7 @@ describe LicenseGroup do
     end
     context 'captionを検証するとき' do
       before do
-        @lg = Factory.build :license_group
+        @lg = FactoryGirl.build :license_group
       end
       it 'テストデータの確認' do
         @lg.caption = 'a'*30
@@ -77,7 +77,7 @@ describe LicenseGroup do
     end
     context 'urlを検証するとき' do
       before do
-        @lg = Factory.build :license_group
+        @lg = FactoryGirl.build :license_group
       end
       it 'テストデータの確認' do
         @lg.url = 'http://test.com/'
@@ -265,7 +265,7 @@ describe LicenseGroup do
   
   describe '単体取得に於いて' do
     before do
-      @lg = Factory :license_group
+      @lg = FactoryGirl.create :license_group
     end
     it '指定のコマを返す' do
       l = LicenseGroup.show @lg.id
@@ -296,14 +296,14 @@ describe LicenseGroup do
   end
   describe '一覧取得に於いて' do
     before do
-      @lg = Factory :license_group, :name => "1"
+      @lg = FactoryGirl.create :license_group, :name => "1"
     end
     it 'リストを返す' do
       l = LicenseGroup.list
       l.should eq [@lg]
     end
     it '名前順で並んでいる' do
-      @lg2 = Factory :license_group, :name => "5", :url => 'http://test.ptn/10'
+      @lg2 = FactoryGirl.create :license_group, :name => "5", :url => 'http://test.ptn/10'
       l = LicenseGroup.list
       l.should eq [@lg, @lg2]
     end