aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc Florisson2012-06-27 15:09:35 +0200
committerMarc Florisson2012-06-27 15:09:35 +0200
commita96398d24c195c0224e985be9a12b8bd12f76143 (patch)
treeb3c14c57fb67c50468ce0e77558c74b592b22b09
parentb9e5f8f5dd642e7efd7969a3dd1571edea2facb8 (diff)
parentd3f748e11b0dd11a3678aeb45dae8143124653e7 (diff)
downloadchouette-core-a96398d24c195c0224e985be9a12b8bd12f76143.tar.bz2
Merge branch 'master' of chouette.dryade.priv:/srv/git/chouette2
-rw-r--r--doc/mockups/import-data-index.bmml149
-rw-r--r--doc/mockups/import-data-index.pngbin0 -> 76403 bytes
-rw-r--r--doc/mockups/imports-vehiculejourneyatstops-index.bmml222
-rw-r--r--doc/mockups/imports-vehiculejourneyatstops-index.pngbin0 -> 58808 bytes
-rw-r--r--spec/controllers/routes_controller_spec.rb3
-rw-r--r--spec/controllers/stop_points_controller_spec.rb3
-rw-r--r--spec/factories.rb5
-rw-r--r--spec/requests/companies_spec.rb3
-rw-r--r--spec/requests/connection_links_spec.rb3
-rw-r--r--spec/requests/journey_pattern_spec.rb1
-rw-r--r--spec/requests/lines_spec.rb1
-rw-r--r--spec/requests/networks_spec.rb3
-rw-r--r--spec/requests/routes_spec.rb1
-rw-r--r--spec/requests/stop_areas_spec.rb3
-rw-r--r--spec/requests/stop_points_spec.rb7
-rw-r--r--spec/requests/time_tables_spec.rb3
-rw-r--r--spec/spec_helper.rb27
-rw-r--r--spec/support/referential.rb39
-rw-r--r--spec/views/companies/edit.html.erb_spec.rb2
-rw-r--r--spec/views/companies/index.html.erb_spec.rb2
-rw-r--r--spec/views/companies/new.html.erb_spec.rb2
-rw-r--r--spec/views/companies/show.html.erb_spec.rb2
-rw-r--r--spec/views/connection_links/edit.html.erb_spec.rb2
-rw-r--r--spec/views/connection_links/index.html.erb_spec.rb2
-rw-r--r--spec/views/connection_links/new.html.erb_spec.rb2
-rw-r--r--spec/views/connection_links/show.html.erb_spec.rb2
-rw-r--r--spec/views/imports/new.html.erb_spec.rb2
-rw-r--r--spec/views/lines/edit.html.erb_spec.rb2
-rw-r--r--spec/views/lines/index.html.erb_spec.rb2
-rw-r--r--spec/views/lines/new.html.erb_spec.rb2
-rw-r--r--spec/views/lines/show.html.erb_spec.rb2
-rw-r--r--spec/views/networks/edit.html.erb_spec.rb2
-rw-r--r--spec/views/networks/index.html.erb_spec.rb2
-rw-r--r--spec/views/networks/new.html.erb_spec.rb2
-rw-r--r--spec/views/networks/show.html.erb_spec.rb2
-rw-r--r--spec/views/referentials/new.html.erb_spec.rb2
-rw-r--r--spec/views/referentials/show.html.erb_spec.rb2
-rw-r--r--spec/views/routes/show.html.erb_spec.rb2
-rw-r--r--spec/views/stop_areas/edit.html.erb_spec.rb2
-rw-r--r--spec/views/stop_areas/index.html.erb_spec.rb2
-rw-r--r--spec/views/stop_areas/new.html.erb_spec.rb2
-rw-r--r--spec/views/stop_areas/show.html.erb_spec.rb2
-rw-r--r--spec/views/time_tables/edit.html.erb_spec.rb2
-rw-r--r--spec/views/time_tables/index.html.erb_spec.rb2
-rw-r--r--spec/views/time_tables/new.html.erb_spec.rb2
-rw-r--r--spec/views/time_tables/show.html.erb_spec.rb2
-rw-r--r--spec/views/vehicle_journeys/_form.html.erb_spec.rb2
-rw-r--r--spec/views/vehicle_journeys/_vehicle_journey_at_stop_fields.html.erb_spec.rb2
-rw-r--r--spec/views/vehicle_journeys/edit.html.erb_spec.rb2
-rw-r--r--spec/views/vehicle_journeys/new.html.erb_spec.rb2
50 files changed, 456 insertions, 81 deletions
diff --git a/doc/mockups/import-data-index.bmml b/doc/mockups/import-data-index.bmml
new file mode 100644
index 000000000..2b0d516ea
--- /dev/null
+++ b/doc/mockups/import-data-index.bmml
@@ -0,0 +1,149 @@
+<mockup version="1.0" skin="sketch" measuredW="942" measuredH="589" mockupW="753" mockupH="564">
+ <controls>
+ <control controlID="18" controlTypeID="com.balsamiq.mockups::Title" x="226" y="147" w="-1" h="-1" measuredW="526" measuredH="37" zOrder="2" locked="false" isInGroup="-1">
+ <controlProperties>
+ <size>28</size>
+ <text>Import%20de%20donn%E9es%20brutes%20%3A%20Donnees%20Mars</text>
+ </controlProperties>
+ </control>
+ <control controlID="20" controlTypeID="com.balsamiq.mockups::ButtonBar" x="226" y="90" w="-1" h="-1" measuredW="381" measuredH="29" zOrder="3" locked="false" isInGroup="-1">
+ <controlProperties>
+ <selectedIndex>2</selectedIndex>
+ <text>Tableau%20de%20bord%2C%20Lignes%2C%20Arr%EAts%2C%20...%2C%20Courses</text>
+ </controlProperties>
+ </control>
+ <control controlID="23" controlTypeID="com.balsamiq.mockups::FieldSet" x="189" y="121" w="588" h="468" measuredW="200" measuredH="170" zOrder="1" locked="false" isInGroup="-1">
+ <controlProperties>
+ <text/>
+ </controlProperties>
+ </control>
+ <control controlID="24" controlTypeID="com.balsamiq.mockups::FieldSet" x="189" y="25" w="753" h="96" measuredW="200" measuredH="170" zOrder="0" locked="false" isInGroup="-1">
+ <controlProperties>
+ <text/>
+ </controlProperties>
+ </control>
+ <control controlID="74" controlTypeID="com.balsamiq.mockups::StickyNote" x="800" y="184" w="242" h="90" measuredW="109" measuredH="123" zOrder="5" locked="false" isInGroup="-1">
+ <controlProperties>
+ <text>Facilitateurs%20qui%20apparaissent%20quand%20on%20survole%20le%20passage</text>
+ </controlProperties>
+ </control>
+ <control controlID="76" controlTypeID="com.balsamiq.mockups::Arrow" x="668" y="228" w="221" h="39" measuredW="150" measuredH="100" zOrder="4" locked="false" isInGroup="-1">
+ <controlProperties>
+ <direction>bottom</direction>
+ <rightArrow>false</rightArrow>
+ <text/>
+ </controlProperties>
+ </control>
+ <control controlID="77" controlTypeID="com.balsamiq.mockups::Arrow" x="668" y="354" w="221" h="39" measuredW="150" measuredH="100" zOrder="6" locked="false" isInGroup="-1">
+ <controlProperties>
+ <direction>bottom</direction>
+ <rightArrow>false</rightArrow>
+ <text/>
+ </controlProperties>
+ </control>
+ <control controlID="78" controlTypeID="com.balsamiq.mockups::StickyNote" x="800" y="310" w="242" h="90" measuredW="109" measuredH="123" zOrder="7" locked="false" isInGroup="-1">
+ <controlProperties>
+ <text>Facilitateurs%20qui%20apparaissent%20quand%20on%20edite%20l%27horaire</text>
+ </controlProperties>
+ </control>
+ <control controlID="80" controlTypeID="com.balsamiq.mockups::StickyNote" x="516" y="551" w="182" h="114" measuredW="109" measuredH="123" zOrder="8" locked="false" isInGroup="-1">
+ <controlProperties>
+ <align>center</align>
+ <text>S%E9lection%20pour%20effectuer%20des%20op%E9rations%20sur%20plusieurs%20passages</text>
+ </controlProperties>
+ </control>
+ <control controlID="83" controlTypeID="com.balsamiq.mockups::StickyNote" x="486" y="893" w="242" h="90" measuredW="109" measuredH="123" zOrder="9" locked="false" isInGroup="-1">
+ <controlProperties>
+ <align>center</align>
+ <text>Facilitateurs%20sp%E9cifiques%20lorsqu%27une%20s%E9lection%20est%20disponible</text>
+ </controlProperties>
+ </control>
+ <control controlID="90" controlTypeID="com.balsamiq.mockups::DataGrid" x="226" y="236" w="509" h="296" measuredW="566" measuredH="307" zOrder="10" locked="false" isInGroup="-1">
+ <controlProperties>
+ <borderStyle>none</borderStyle>
+ <hasHeader>false</hasHeader>
+ <selectedIndex>-1</selectedIndex>
+ <text>71%2CCharles%20David%2CHastusTUR%3AStopArea%3ACOM601%2C43.96379%2C4.800694%2CValide%0A72%2CZola%2CHastusTUR%3AStopArea%3ACOM582%2C43.95615%2C4.845099%2CValide%0A73%2CSaint%20Lazare%2CHastusTUR%3AStopArea%3ACOM504%2C43.9502%2C4.81969%2CValide%0A74%2CLes%20Sources%2CHastusTUR%3AStopArea%3APHYsourc1%2C43.943146%2C4.812051%2CValide%0A75%2CLes%20Sources%2CHastusTUR%3AStopArea%3APHYsourc2%2C43.943146%2C4.812051%2CValide%0A76%2CIle%20Piot%2CHastusTUR%3AStopArea%3APHYpiot2%2C*0*%2C*0*%2C*Ignor%E9e*%0A77%2CIle%20Piot%2CHastusTUR%3AStopArea%3APHYpiot1%2C*0*%2C*0*%2C*Invalide*%0A78%2CPorte%20de%20l%27Oulle%2CHastusTUR%3AStopArea%3APHY103%2C43.950073%2C4.802352%2CValide%0A79%2CThiers%2CHastusTUR%3AStopArea%3APHYthier2%2C43.946439%2C4.817314%2CValide%0A80%2CThiers%2CHastusTUR%3AStopArea%3APHYthier1%2C43.946439%2C4.817314%2CValide%0A%7B0R%2C15L%2C20L%2C0R%2C0R%2C0L%7D</text>
+ </controlProperties>
+ </control>
+ <control controlID="91" controlTypeID="com.balsamiq.mockups::LinkBar" x="446" y="547" w="-1" h="-1" measuredW="289" measuredH="18" zOrder="11" locked="false" isInGroup="-1">
+ <controlProperties>
+ <size>11</size>
+ <text>%3C%20Pr%E9c%E9dent%2C%205%2C%206%2C%20*7*%2C%208%2C%209%2C%20Suivant%20%3E</text>
+ </controlProperties>
+ </control>
+ <control controlID="92" controlTypeID="com.balsamiq.mockups::ComboBox" x="251" y="213" w="120" h="-1" measuredW="58" measuredH="23" zOrder="12" locked="false" isInGroup="-1">
+ <controlProperties>
+ <text>Nom</text>
+ </controlProperties>
+ </control>
+ <control controlID="93" controlTypeID="com.balsamiq.mockups::ComboBox" x="526" y="213" w="77" h="-1" measuredW="78" measuredH="23" zOrder="13" locked="false" isInGroup="-1">
+ <controlProperties>
+ <text>Latitude</text>
+ </controlProperties>
+ </control>
+ <control controlID="94" controlTypeID="com.balsamiq.mockups::ComboBox" x="603" y="213" w="71" h="-1" measuredW="86" measuredH="23" zOrder="14" locked="false" isInGroup="-1">
+ <controlProperties>
+ <text>Longitude</text>
+ </controlProperties>
+ </control>
+ <control controlID="95" controlTypeID="com.balsamiq.mockups::ComboBox" x="371" y="213" w="155" h="-1" measuredW="81" measuredH="23" zOrder="15" locked="false" isInGroup="-1">
+ <controlProperties>
+ <text>ObjectID</text>
+ </controlProperties>
+ </control>
+ <control controlID="96" controlTypeID="com.balsamiq.mockups::Label" x="226" y="184" w="-1" h="-1" measuredW="326" measuredH="21" zOrder="16" locked="false" isInGroup="-1">
+ <controlProperties>
+ <text>97%20lignes%20de%20donn%E9es%2C%2094%20valid%E9es%2C%202%20invalides%2C%201%20ignor%E9e</text>
+ </controlProperties>
+ </control>
+ <control controlID="98" controlTypeID="com.balsamiq.mockups::Label" x="676" y="215" w="-1" h="-1" measuredW="42" measuredH="21" zOrder="17" locked="false" isInGroup="-1">
+ <controlProperties>
+ <text>Status</text>
+ </controlProperties>
+ </control>
+ <control controlID="100" controlTypeID="com.balsamiq.mockups::Link" x="793" y="155" w="-1" h="-1" measuredW="118" measuredH="21" zOrder="18" locked="false" isInGroup="-1">
+ <controlProperties>
+ <text>Valider%20les%20donn%E9es</text>
+ </controlProperties>
+ </control>
+ <control controlID="101" controlTypeID="com.balsamiq.mockups::Link" x="793" y="177" w="-1" h="-1" measuredW="129" measuredH="21" zOrder="19" locked="false" isInGroup="-1">
+ <controlProperties>
+ <state>disabled</state>
+ <text>Importer%20les%20donn%E9es</text>
+ <underline>false</underline>
+ </controlProperties>
+ </control>
+ <control controlID="102" controlTypeID="com.balsamiq.mockups::Link" x="793" y="213" w="-1" h="-1" measuredW="128" measuredH="21" zOrder="20" locked="false" isInGroup="-1">
+ <controlProperties>
+ <text>Supprimer%20cet%20import</text>
+ </controlProperties>
+ </control>
+ <control controlID="103" controlTypeID="com.balsamiq.mockups::Label" x="793" y="246" w="-1" h="-1" measuredW="64" measuredH="21" zOrder="21" locked="false" isInGroup="-1">
+ <controlProperties>
+ <bold>true</bold>
+ <text>Filtrer%20sur</text>
+ </controlProperties>
+ </control>
+ <control controlID="104" controlTypeID="com.balsamiq.mockups::Link" x="793" y="295" w="-1" h="-1" measuredW="100" measuredH="21" zOrder="22" locked="false" isInGroup="-1">
+ <controlProperties>
+ <text>Donn%E9es%20Valides</text>
+ </controlProperties>
+ </control>
+ <control controlID="105" controlTypeID="com.balsamiq.mockups::Link" x="793" y="318" w="-1" h="-1" measuredW="109" measuredH="21" zOrder="23" locked="false" isInGroup="-1">
+ <controlProperties>
+ <text>Donn%E9es%20Invalides</text>
+ </controlProperties>
+ </control>
+ <control controlID="106" controlTypeID="com.balsamiq.mockups::Link" x="793" y="345" w="-1" h="-1" measuredW="111" measuredH="21" zOrder="24" locked="false" isInGroup="-1">
+ <controlProperties>
+ <text>Donn%E9es%20Ignor%E9es</text>
+ </controlProperties>
+ </control>
+ <control controlID="107" controlTypeID="com.balsamiq.mockups::Label" x="793" y="274" w="-1" h="-1" measuredW="42" measuredH="21" zOrder="25" locked="false" isInGroup="-1">
+ <controlProperties>
+ <text>Status</text>
+ </controlProperties>
+ </control>
+ </controls>
+</mockup> \ No newline at end of file
diff --git a/doc/mockups/import-data-index.png b/doc/mockups/import-data-index.png
new file mode 100644
index 000000000..3df0f57ea
--- /dev/null
+++ b/doc/mockups/import-data-index.png
Binary files differ
diff --git a/doc/mockups/imports-vehiculejourneyatstops-index.bmml b/doc/mockups/imports-vehiculejourneyatstops-index.bmml
new file mode 100644
index 000000000..e7c15ad2e
--- /dev/null
+++ b/doc/mockups/imports-vehiculejourneyatstops-index.bmml
@@ -0,0 +1,222 @@
+<mockup version="1.0" skin="sketch" measuredW="942" measuredH="760" mockupW="798" mockupH="735">
+ <controls>
+ <control controlID="18" controlTypeID="com.balsamiq.mockups::Title" x="226" y="147" w="-1" h="-1" measuredW="518" measuredH="37" zOrder="2" locked="false" isInGroup="-1">
+ <controlProperties>
+ <size>28</size>
+ <text>Import%20de%20courses%20brutes%20%3A%20Donnees%20Mars</text>
+ </controlProperties>
+ </control>
+ <control controlID="20" controlTypeID="com.balsamiq.mockups::ButtonBar" x="226" y="90" w="-1" h="-1" measuredW="381" measuredH="29" zOrder="3" locked="false" isInGroup="-1">
+ <controlProperties>
+ <selectedIndex>2</selectedIndex>
+ <text>Tableau%20de%20bord%2C%20Lignes%2C%20Arr%EAts%2C%20...%2C%20Courses</text>
+ </controlProperties>
+ </control>
+ <control controlID="23" controlTypeID="com.balsamiq.mockups::FieldSet" x="144" y="121" w="633" h="639" measuredW="200" measuredH="170" zOrder="1" locked="false" isInGroup="-1">
+ <controlProperties>
+ <text/>
+ </controlProperties>
+ </control>
+ <control controlID="24" controlTypeID="com.balsamiq.mockups::FieldSet" x="189" y="25" w="753" h="96" measuredW="200" measuredH="170" zOrder="0" locked="false" isInGroup="-1">
+ <controlProperties>
+ <text/>
+ </controlProperties>
+ </control>
+ <control controlID="74" controlTypeID="com.balsamiq.mockups::StickyNote" x="800" y="184" w="242" h="90" measuredW="109" measuredH="123" zOrder="5" locked="false" isInGroup="-1">
+ <controlProperties>
+ <text>Facilitateurs%20qui%20apparaissent%20quand%20on%20survole%20le%20passage</text>
+ </controlProperties>
+ </control>
+ <control controlID="76" controlTypeID="com.balsamiq.mockups::Arrow" x="668" y="228" w="221" h="39" measuredW="150" measuredH="100" zOrder="4" locked="false" isInGroup="-1">
+ <controlProperties>
+ <direction>bottom</direction>
+ <rightArrow>false</rightArrow>
+ <text/>
+ </controlProperties>
+ </control>
+ <control controlID="77" controlTypeID="com.balsamiq.mockups::Arrow" x="668" y="354" w="221" h="39" measuredW="150" measuredH="100" zOrder="6" locked="false" isInGroup="-1">
+ <controlProperties>
+ <direction>bottom</direction>
+ <rightArrow>false</rightArrow>
+ <text/>
+ </controlProperties>
+ </control>
+ <control controlID="78" controlTypeID="com.balsamiq.mockups::StickyNote" x="800" y="310" w="242" h="90" measuredW="109" measuredH="123" zOrder="7" locked="false" isInGroup="-1">
+ <controlProperties>
+ <text>Facilitateurs%20qui%20apparaissent%20quand%20on%20edite%20l%27horaire</text>
+ </controlProperties>
+ </control>
+ <control controlID="80" controlTypeID="com.balsamiq.mockups::StickyNote" x="516" y="551" w="182" h="114" measuredW="109" measuredH="123" zOrder="8" locked="false" isInGroup="-1">
+ <controlProperties>
+ <align>center</align>
+ <text>S%E9lection%20pour%20effectuer%20des%20op%E9rations%20sur%20plusieurs%20passages</text>
+ </controlProperties>
+ </control>
+ <control controlID="83" controlTypeID="com.balsamiq.mockups::StickyNote" x="486" y="893" w="242" h="90" measuredW="109" measuredH="123" zOrder="9" locked="false" isInGroup="-1">
+ <controlProperties>
+ <align>center</align>
+ <text>Facilitateurs%20sp%E9cifiques%20lorsqu%27une%20s%E9lection%20est%20disponible</text>
+ </controlProperties>
+ </control>
+ <control controlID="90" controlTypeID="com.balsamiq.mockups::DataGrid" x="430" y="473" w="339" h="174" measuredW="158" measuredH="97" zOrder="10" locked="false" isInGroup="-1">
+ <controlProperties>
+ <borderStyle>none</borderStyle>
+ <hasHeader>false</hasHeader>
+ <selectedIndex>-1</selectedIndex>
+ <text>17%3A23%2C18h34%2C19-12%0A17%3A26%2C-%2C19-16%0A17h32%2C18h42%2C19-25</text>
+ </controlProperties>
+ </control>
+ <control controlID="91" controlTypeID="com.balsamiq.mockups::LinkBar" x="446" y="718" w="-1" h="-1" measuredW="289" measuredH="18" zOrder="11" locked="false" isInGroup="-1">
+ <controlProperties>
+ <size>11</size>
+ <text>%3C%20Pr%E9c%E9dent%2C%205%2C%206%2C%20*7*%2C%208%2C%209%2C%20Suivant%20%3E</text>
+ </controlProperties>
+ </control>
+ <control controlID="92" controlTypeID="com.balsamiq.mockups::ComboBox" x="214" y="368" w="189" h="-1" measuredW="58" measuredH="23" zOrder="12" locked="false" isInGroup="-1">
+ <controlProperties>
+ <text>Nom</text>
+ </controlProperties>
+ </control>
+ <control controlID="94" controlTypeID="com.balsamiq.mockups::ComboBox" x="431" y="316" w="106" h="-1" measuredW="81" measuredH="23" zOrder="13" locked="false" isInGroup="-1">
+ <controlProperties>
+ <text>Semaine</text>
+ </controlProperties>
+ </control>
+ <control controlID="96" controlTypeID="com.balsamiq.mockups::Label" x="226" y="184" w="-1" h="-1" measuredW="274" measuredH="21" zOrder="14" locked="false" isInGroup="-1">
+ <controlProperties>
+ <text>97%20colonnes%2C%2094%20valid%E9es%2C%202%20invalides%2C%201%20ignor%E9e</text>
+ </controlProperties>
+ </control>
+ <control controlID="100" controlTypeID="com.balsamiq.mockups::Link" x="793" y="155" w="-1" h="-1" measuredW="118" measuredH="21" zOrder="15" locked="false" isInGroup="-1">
+ <controlProperties>
+ <text>Valider%20les%20donn%E9es</text>
+ </controlProperties>
+ </control>
+ <control controlID="101" controlTypeID="com.balsamiq.mockups::Link" x="793" y="177" w="-1" h="-1" measuredW="129" measuredH="21" zOrder="16" locked="false" isInGroup="-1">
+ <controlProperties>
+ <state>disabled</state>
+ <text>Importer%20les%20donn%E9es</text>
+ <underline>false</underline>
+ </controlProperties>
+ </control>
+ <control controlID="102" controlTypeID="com.balsamiq.mockups::Link" x="793" y="213" w="-1" h="-1" measuredW="128" measuredH="21" zOrder="17" locked="false" isInGroup="-1">
+ <controlProperties>
+ <text>Supprimer%20cet%20import</text>
+ </controlProperties>
+ </control>
+ <control controlID="103" controlTypeID="com.balsamiq.mockups::Label" x="793" y="246" w="-1" h="-1" measuredW="64" measuredH="21" zOrder="18" locked="false" isInGroup="-1">
+ <controlProperties>
+ <bold>true</bold>
+ <text>Filtrer%20sur</text>
+ </controlProperties>
+ </control>
+ <control controlID="104" controlTypeID="com.balsamiq.mockups::Link" x="793" y="295" w="-1" h="-1" measuredW="100" measuredH="21" zOrder="19" locked="false" isInGroup="-1">
+ <controlProperties>
+ <text>Donn%E9es%20Valides</text>
+ </controlProperties>
+ </control>
+ <control controlID="105" controlTypeID="com.balsamiq.mockups::Link" x="793" y="318" w="-1" h="-1" measuredW="109" measuredH="21" zOrder="20" locked="false" isInGroup="-1">
+ <controlProperties>
+ <text>Donn%E9es%20Invalides</text>
+ </controlProperties>
+ </control>
+ <control controlID="106" controlTypeID="com.balsamiq.mockups::Link" x="793" y="345" w="-1" h="-1" measuredW="111" measuredH="21" zOrder="21" locked="false" isInGroup="-1">
+ <controlProperties>
+ <text>Donn%E9es%20Ignor%E9es</text>
+ </controlProperties>
+ </control>
+ <control controlID="107" controlTypeID="com.balsamiq.mockups::Label" x="793" y="274" w="-1" h="-1" measuredW="42" measuredH="21" zOrder="22" locked="false" isInGroup="-1">
+ <controlProperties>
+ <text>Status</text>
+ </controlProperties>
+ </control>
+ <control controlID="108" controlTypeID="com.balsamiq.mockups::ComboBox" x="431" y="285" w="106" h="-1" measuredW="81" measuredH="23" zOrder="23" locked="false" isInGroup="-1">
+ <controlProperties>
+ <text>Mission%201</text>
+ </controlProperties>
+ </control>
+ <control controlID="110" controlTypeID="com.balsamiq.mockups::Label" x="358" y="286" w="-1" h="-1" measuredW="44" measuredH="21" zOrder="24" locked="false" isInGroup="-1">
+ <controlProperties>
+ <text>Mission</text>
+ </controlProperties>
+ </control>
+ <control controlID="111" controlTypeID="com.balsamiq.mockups::Label" x="357" y="320" w="-1" h="-1" measuredW="65" measuredH="21" zOrder="25" locked="false" isInGroup="-1">
+ <controlProperties>
+ <text>Calendrier</text>
+ </controlProperties>
+ </control>
+ <control controlID="112" controlTypeID="com.balsamiq.mockups::ComboBox" x="538" y="287" w="106" h="-1" measuredW="83" measuredH="23" zOrder="26" locked="false" isInGroup="-1">
+ <controlProperties>
+ <text>Mission%202</text>
+ </controlProperties>
+ </control>
+ <control controlID="113" controlTypeID="com.balsamiq.mockups::ComboBox" x="650" y="287" w="106" h="-1" measuredW="81" measuredH="23" zOrder="27" locked="false" isInGroup="-1">
+ <controlProperties>
+ <text>Mission%201</text>
+ </controlProperties>
+ </control>
+ <control controlID="114" controlTypeID="com.balsamiq.mockups::ComboBox" x="546" y="320" w="106" h="-1" measuredW="93" measuredH="23" zOrder="28" locked="false" isInGroup="-1">
+ <controlProperties>
+ <text>Week-end</text>
+ </controlProperties>
+ </control>
+ <control controlID="115" controlTypeID="com.balsamiq.mockups::ComboBox" x="659" y="322" w="106" h="-1" measuredW="93" measuredH="23" zOrder="29" locked="false" isInGroup="-1">
+ <controlProperties>
+ <text>Week-end</text>
+ </controlProperties>
+ </control>
+ <control controlID="116" controlTypeID="com.balsamiq.mockups::ComboBox" x="223" y="478" w="189" h="-1" measuredW="111" measuredH="23" zOrder="30" locked="false" isInGroup="-1">
+ <controlProperties>
+ <text>Charles%20David</text>
+ </controlProperties>
+ </control>
+ <control controlID="117" controlTypeID="com.balsamiq.mockups::ComboBox" x="222" y="510" w="189" h="-1" measuredW="114" measuredH="23" zOrder="31" locked="false" isInGroup="-1">
+ <controlProperties>
+ <text>Gare%20Centrale</text>
+ </controlProperties>
+ </control>
+ <control controlID="118" controlTypeID="com.balsamiq.mockups::ComboBox" x="223" y="539" w="189" h="-1" measuredW="71" measuredH="23" zOrder="32" locked="false" isInGroup="-1">
+ <controlProperties>
+ <text>Piscine</text>
+ </controlProperties>
+ </control>
+ <control controlID="119" controlTypeID="com.balsamiq.mockups::Label" x="214" y="446" w="-1" h="-1" measuredW="44" measuredH="21" zOrder="33" locked="false" isInGroup="-1">
+ <controlProperties>
+ <text>Arrets</text>
+ </controlProperties>
+ </control>
+ <control controlID="120" controlTypeID="com.balsamiq.mockups::DataGrid" x="433" y="368" w="336" h="64" measuredW="208" measuredH="67" zOrder="34" locked="false" isInGroup="-1">
+ <controlProperties>
+ <borderStyle>none</borderStyle>
+ <hasHeader>false</hasHeader>
+ <selectedIndex>-1</selectedIndex>
+ <text>Course%201%2C%20Course%202%2C%20Course%203%0AA%2CB%2CB</text>
+ </controlProperties>
+ </control>
+ <control controlID="121" controlTypeID="com.balsamiq.mockups::ComboBox" x="214" y="404" w="189" h="-1" measuredW="73" measuredH="23" zOrder="35" locked="false" isInGroup="-1">
+ <controlProperties>
+ <text>Inconnu</text>
+ </controlProperties>
+ </control>
+ <control controlID="122" controlTypeID="com.balsamiq.mockups::Label" x="359" y="253" w="-1" h="-1" measuredW="42" measuredH="21" zOrder="36" locked="false" isInGroup="-1">
+ <controlProperties>
+ <text>Status</text>
+ </controlProperties>
+ </control>
+ <control controlID="123" controlTypeID="com.balsamiq.mockups::Label" x="439" y="251" w="67" h="24" measuredW="40" measuredH="21" zOrder="37" locked="false" isInGroup="-1">
+ <controlProperties>
+ <text>Valide</text>
+ </controlProperties>
+ </control>
+ <control controlID="124" controlTypeID="com.balsamiq.mockups::Label" x="556" y="252" w="67" h="24" measuredW="49" measuredH="21" zOrder="38" locked="false" isInGroup="-1">
+ <controlProperties>
+ <text>Invalide</text>
+ </controlProperties>
+ </control>
+ <control controlID="125" controlTypeID="com.balsamiq.mockups::Label" x="654" y="252" w="67" h="24" measuredW="40" measuredH="21" zOrder="39" locked="false" isInGroup="-1">
+ <controlProperties>
+ <text>Valide</text>
+ </controlProperties>
+ </control>
+ </controls>
+</mockup> \ No newline at end of file
diff --git a/doc/mockups/imports-vehiculejourneyatstops-index.png b/doc/mockups/imports-vehiculejourneyatstops-index.png
new file mode 100644
index 000000000..88be62c66
--- /dev/null
+++ b/doc/mockups/imports-vehiculejourneyatstops-index.png
Binary files differ
diff --git a/spec/controllers/routes_controller_spec.rb b/spec/controllers/routes_controller_spec.rb
index 92bcbf4a8..9356e1a9a 100644
--- a/spec/controllers/routes_controller_spec.rb
+++ b/spec/controllers/routes_controller_spec.rb
@@ -3,8 +3,7 @@ require 'spec_helper'
describe RoutesController do
login_user
- let!(:referential) { create(:referential).switch }
- let!(:route) { referential; Factory(:route) }
+ let!(:route) { Factory(:route) }
it { should be_kind_of(ChouetteController) }
diff --git a/spec/controllers/stop_points_controller_spec.rb b/spec/controllers/stop_points_controller_spec.rb
index b6c9e5dfa..ef63ae613 100644
--- a/spec/controllers/stop_points_controller_spec.rb
+++ b/spec/controllers/stop_points_controller_spec.rb
@@ -3,8 +3,7 @@ require 'spec_helper'
describe StopPointsController do
login_user
- let!(:referential) { create(:referential).switch }
- let!(:route) { referential; Factory(:route) }
+ let!(:route) { Factory(:route) }
let(:permutated_stop_point_ids) {
old_stop_point_ids = route.stop_points.map(&:id)
old_stop_point_ids.permutation.to_a.select { |permutated| permutated != old_stop_point_ids}.first
diff --git a/spec/factories.rb b/spec/factories.rb
index fdd23eded..faf1fef94 100644
--- a/spec/factories.rb
+++ b/spec/factories.rb
@@ -4,6 +4,7 @@ FactoryGirl.define do
f.sequence(:name) { |n| "Test #{n}" }
f.sequence(:slug) { |n| "test_#{n}" }
f.sequence(:prefix) { |n| "test_#{n}" }
+
f.time_zone "Europe/Paris"
end
@@ -15,7 +16,7 @@ FactoryGirl.define do
factory :import do |f|
f.resources { Rack::Test::UploadedFile.new 'spec/fixtures/neptune.zip', 'application/zip', false }
- f.association :referential
+ f.referential { Referential.find_by_slug("first") }
end
factory :import_log_message do |f|
@@ -24,7 +25,7 @@ FactoryGirl.define do
end
factory :export do |f|
- f.association :referential
+ f.referential { Referential.find_by_slug("first") }
end
factory :export_log_message do |f|
diff --git a/spec/requests/companies_spec.rb b/spec/requests/companies_spec.rb
index f0716dcd9..dbacd4a71 100644
--- a/spec/requests/companies_spec.rb
+++ b/spec/requests/companies_spec.rb
@@ -4,8 +4,7 @@ require 'spec_helper'
describe "Companies" do
login_user
- let(:referential) { create(:referential).switch }
- let(:companies) { referential; Array.new(2) { create(:company) } }
+ let(:companies) { Array.new(2) { create :company } }
subject { companies.first }
describe "list" do
diff --git a/spec/requests/connection_links_spec.rb b/spec/requests/connection_links_spec.rb
index 76d8a942c..48b5aa41d 100644
--- a/spec/requests/connection_links_spec.rb
+++ b/spec/requests/connection_links_spec.rb
@@ -4,8 +4,7 @@ require 'spec_helper'
describe "ConnectionLinks" do
login_user
- let(:referential) { create(:referential).switch }
- let(:connection_links) { referential; Array.new(2) { create(:connection_link) } }
+ let(:connection_links) { Array.new(2) { create(:connection_link) } }
subject { connection_links.first }
describe "list" do
diff --git a/spec/requests/journey_pattern_spec.rb b/spec/requests/journey_pattern_spec.rb
index ce36b3002..d5afcfbf0 100644
--- a/spec/requests/journey_pattern_spec.rb
+++ b/spec/requests/journey_pattern_spec.rb
@@ -4,7 +4,6 @@ require 'spec_helper'
describe "JourneyPatterns" do
login_user
- let(:referential) { create(:referential).switch }
let(:line) { Factory(:line) }
let(:route) { Factory(:route, :line => line) }
let(:journey_pattern) { Factory(:journey_pattern, :route => route) }
diff --git a/spec/requests/lines_spec.rb b/spec/requests/lines_spec.rb
index 32254bce1..10d653f30 100644
--- a/spec/requests/lines_spec.rb
+++ b/spec/requests/lines_spec.rb
@@ -4,7 +4,6 @@ require 'spec_helper'
describe "Lines" do
login_user
- let(:referential) { create(:referential).switch }
let(:network) { Factory(:network) }
let(:company) { Factory(:company) }
let(:lines) { referential; Array.new(2) { Factory(:line, :network => network, :company => company) } }
diff --git a/spec/requests/networks_spec.rb b/spec/requests/networks_spec.rb
index 1b15436ee..f73724a48 100644
--- a/spec/requests/networks_spec.rb
+++ b/spec/requests/networks_spec.rb
@@ -4,8 +4,7 @@ require 'spec_helper'
describe "Networks" do
login_user
- let(:referential) { create(:referential).switch }
- let(:networks) { referential; Array.new(2) { Factory(:network) } }
+ let(:networks) { Array.new(2) { Factory(:network) } }
subject { networks.first }
describe "list" do
diff --git a/spec/requests/routes_spec.rb b/spec/requests/routes_spec.rb
index baddfdf95..3ba1985eb 100644
--- a/spec/requests/routes_spec.rb
+++ b/spec/requests/routes_spec.rb
@@ -4,7 +4,6 @@ require 'spec_helper'
describe "Routes" do
login_user
- let(:referential) { create(:referential).switch }
let(:line) { Factory(:line) }
let(:route) { Factory(:route, :line => line) }
let(:route2) { Factory(:route, :line => line) }
diff --git a/spec/requests/stop_areas_spec.rb b/spec/requests/stop_areas_spec.rb
index b81f70a6c..5d4e3afb3 100644
--- a/spec/requests/stop_areas_spec.rb
+++ b/spec/requests/stop_areas_spec.rb
@@ -4,8 +4,7 @@ require 'spec_helper'
describe "StopAreas" do
login_user
- let(:referential) { create(:referential).switch }
- let(:stop_areas) { referential; Array.new(2) { Factory(:stop_area) } }
+ let(:stop_areas) { Array.new(2) { Factory(:stop_area) } }
subject { stop_areas.first }
describe "list" do
diff --git a/spec/requests/stop_points_spec.rb b/spec/requests/stop_points_spec.rb
index e6e3303ab..39467174f 100644
--- a/spec/requests/stop_points_spec.rb
+++ b/spec/requests/stop_points_spec.rb
@@ -4,10 +4,9 @@ require 'spec_helper'
describe "StopPoints" do
login_user
- let(:referential) { create(:referential).switch }
- let(:line) { referential; Factory(:line) }
- let(:route) { referential; Factory(:route, :line => line) }
- let(:route2) { referential; Factory(:route, :line => line) }
+ let(:line) { Factory(:line) }
+ let(:route) { Factory(:route, :line => line) }
+ let(:route2) { Factory(:route, :line => line) }
describe "from route's page to a stop points page" do
it "display route's stop points" do
diff --git a/spec/requests/time_tables_spec.rb b/spec/requests/time_tables_spec.rb
index bd401dbbf..c935587b3 100644
--- a/spec/requests/time_tables_spec.rb
+++ b/spec/requests/time_tables_spec.rb
@@ -4,8 +4,7 @@ require 'spec_helper'
describe "TimeTables" do
login_user
- let(:referential) { create(:referential).switch }
- let(:time_tables) { referential; Array.new(2) { create(:time_table) } }
+ let(:time_tables) { Array.new(2) { create(:time_table) } }
subject { time_tables.first }
describe "list" do
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index ce52830b4..7f465ca11 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -20,10 +20,9 @@ require 'chouette_factories'
Dir[Rails.root.join("spec/support/**/*.rb")].each {|f| require f}
require 'will_paginate/array'
-require 'database_cleaner'
RSpec.configure do |config|
- DatabaseCleaner.logger = Rails.logger
+
# ## Mock Framework
#
# If you prefer to use mocha, flexmock or RR, uncomment the appropriate line:
@@ -45,28 +44,4 @@ RSpec.configure do |config|
# rspec-rails.
config.infer_base_class_for_anonymous_controllers = false
- config.before(:suite) do
- DatabaseCleaner.strategy = :transaction
-
- begin
- Apartment.database_names.each do |database|
- Apartment::Database.drop(database)
- end
- rescue
- # FIXME referentials table not found in jenkins build #13
- end
-
- DatabaseCleaner.clean_with(:truncation, {:except => %w[spatial_ref_sys geometry_columns]} )
- end
-
- config.before(:each) do
- Apartment::Database.switch(nil)
- DatabaseCleaner.start
- end
-
- config.after(:each) do
- DatabaseCleaner.clean
- Apartment::Database.switch(nil)
- end
-
end
diff --git a/spec/support/referential.rb b/spec/support/referential.rb
new file mode 100644
index 000000000..0d3a7b89a
--- /dev/null
+++ b/spec/support/referential.rb
@@ -0,0 +1,39 @@
+module ReferentialHelper
+
+ def first_referential
+ Referential.find_by_slug("first")
+ end
+
+ def self.included(base)
+ base.class_eval do
+ extend ClassMethods
+ alias_method :referential, :first_referential
+ end
+ end
+
+ module ClassMethods
+
+ def assign_referential
+ before(:each) do
+ assign :referential, referential
+ end
+ end
+
+ end
+
+end
+
+RSpec.configure do |config|
+ config.include ReferentialHelper
+
+ config.before(:suite) do
+ Referential.find_or_create_by_slug FactoryGirl.attributes_for(:referential, :slug => "first")
+ # FIXME in Rails 3.2 :
+ # Referential.where(:slug => 'first').first_or_create(FactoryGirl.attributes_for(:referential))
+ end
+
+ config.before(:each) do
+ first_referential.switch
+ end
+
+end
diff --git a/spec/views/companies/edit.html.erb_spec.rb b/spec/views/companies/edit.html.erb_spec.rb
index 22a561daf..0f7bde351 100644
--- a/spec/views/companies/edit.html.erb_spec.rb
+++ b/spec/views/companies/edit.html.erb_spec.rb
@@ -1,7 +1,7 @@
require 'spec_helper'
describe "/companies/edit" do
- let!(:referential) { assign(:referential, create(:referential)) }
+ assign_referential
let!(:company) { assign(:company, create(:company)) }
let!(:companies) { Array.new(2) { create(:company) } }
diff --git a/spec/views/companies/index.html.erb_spec.rb b/spec/views/companies/index.html.erb_spec.rb
index 23aa91def..686e8ab69 100644
--- a/spec/views/companies/index.html.erb_spec.rb
+++ b/spec/views/companies/index.html.erb_spec.rb
@@ -2,7 +2,7 @@ require 'spec_helper'
describe "/companies/index" do
- let!(:referential) { assign( :referential, create(:referential) ) }
+ assign_referential
let!(:companies) { assign :companies, Array.new(2) { create(:company) }.paginate }
let!(:search) { assign :q, Ransack::Search.new(Chouette::Company) }
diff --git a/spec/views/companies/new.html.erb_spec.rb b/spec/views/companies/new.html.erb_spec.rb
index a28e430f3..86f252cbd 100644
--- a/spec/views/companies/new.html.erb_spec.rb
+++ b/spec/views/companies/new.html.erb_spec.rb
@@ -1,7 +1,7 @@
require 'spec_helper'
describe "/companies/new" do
- let!(:referential) { assign(:referential, create(:referential)) }
+ assign_referential
let!(:company) { assign(:company, build(:company)) }
describe "form" do
diff --git a/spec/views/companies/show.html.erb_spec.rb b/spec/views/companies/show.html.erb_spec.rb
index 7bd20df8c..eea95a406 100644
--- a/spec/views/companies/show.html.erb_spec.rb
+++ b/spec/views/companies/show.html.erb_spec.rb
@@ -2,7 +2,7 @@ require 'spec_helper'
describe "/companies/show" do
- let!(:referential) { assign(:referential, create(:referential)) }
+ assign_referential
let!(:company) { assign(:company, create(:company)) }
it "should render h2 with the company name" do
diff --git a/spec/views/connection_links/edit.html.erb_spec.rb b/spec/views/connection_links/edit.html.erb_spec.rb
index 331529ff8..4294cd6c0 100644
--- a/spec/views/connection_links/edit.html.erb_spec.rb
+++ b/spec/views/connection_links/edit.html.erb_spec.rb
@@ -1,7 +1,7 @@
require 'spec_helper'
describe "/connection_links/edit" do
- let!(:referential) { assign(:referential, create(:referential)) }
+ assign_referential
let!(:connection_link) { assign(:connection_link, create(:connection_link)) }
let!(:connection_links) { Array.new(2) { create(:connection_link) } }
diff --git a/spec/views/connection_links/index.html.erb_spec.rb b/spec/views/connection_links/index.html.erb_spec.rb
index 9732c16c5..39671bdc1 100644
--- a/spec/views/connection_links/index.html.erb_spec.rb
+++ b/spec/views/connection_links/index.html.erb_spec.rb
@@ -2,7 +2,7 @@ require 'spec_helper'
describe "/connection_links/index" do
- let!(:referential) { assign( :referential, create(:referential) ) }
+ assign_referential
let!(:connection_links) { assign :connection_links, Array.new(2) { create(:connection_link) }.paginate }
let!(:search) { assign :q, Ransack::Search.new(Chouette::ConnectionLink) }
diff --git a/spec/views/connection_links/new.html.erb_spec.rb b/spec/views/connection_links/new.html.erb_spec.rb
index 1e9ee570d..c914fccbf 100644
--- a/spec/views/connection_links/new.html.erb_spec.rb
+++ b/spec/views/connection_links/new.html.erb_spec.rb
@@ -1,7 +1,7 @@
require 'spec_helper'
describe "/connection_links/new" do
- let!(:referential) { assign(:referential, create(:referential)) }
+ assign_referential
let!(:connection_link) { assign(:connection_link, build(:connection_link)) }
describe "form" do
diff --git a/spec/views/connection_links/show.html.erb_spec.rb b/spec/views/connection_links/show.html.erb_spec.rb
index 80d3adfb6..433ebc227 100644
--- a/spec/views/connection_links/show.html.erb_spec.rb
+++ b/spec/views/connection_links/show.html.erb_spec.rb
@@ -2,7 +2,7 @@ require 'spec_helper'
describe "/connection_links/show" do
- let!(:referential) { assign(:referential, create(:referential)) }
+ assign_referential
let!(:connection_link) { assign(:connection_link, create(:connection_link)) }
let!(:map) { assign(:map, mock(:to_html => '<div id="map"/>'.html_safe)) }
diff --git a/spec/views/imports/new.html.erb_spec.rb b/spec/views/imports/new.html.erb_spec.rb
index f12932353..dd39a06d5 100644
--- a/spec/views/imports/new.html.erb_spec.rb
+++ b/spec/views/imports/new.html.erb_spec.rb
@@ -2,7 +2,7 @@ require 'spec_helper'
describe "imports/new.html.erb" do
- let!(:referential) { assign(:referential, create(:referential)) }
+ assign_referential
let!(:import) { assign(:import, NeptuneImport.new) }
let!(:available_imports) { assign(:available_imports, []) }
diff --git a/spec/views/lines/edit.html.erb_spec.rb b/spec/views/lines/edit.html.erb_spec.rb
index ca17fbeab..9d733e600 100644
--- a/spec/views/lines/edit.html.erb_spec.rb
+++ b/spec/views/lines/edit.html.erb_spec.rb
@@ -1,7 +1,7 @@
require 'spec_helper'
describe "/lines/edit" do
- let!(:referential) { assign(:referential, create(:referential)) }
+ assign_referential
let!(:network) { create(:network) }
let!(:company) { create(:company) }
let!(:line) { assign(:line, create(:line, :network => network, :company => company)) }
diff --git a/spec/views/lines/index.html.erb_spec.rb b/spec/views/lines/index.html.erb_spec.rb
index 853da2103..2870e6b18 100644
--- a/spec/views/lines/index.html.erb_spec.rb
+++ b/spec/views/lines/index.html.erb_spec.rb
@@ -2,7 +2,7 @@ require 'spec_helper'
describe "/lines/index" do
- let!(:referential) { assign :referential, create(:referential) }
+ assign_referential
let!(:network) { create :network }
let!(:company) { create :company }
let!(:lines) { assign :lines, Array.new(2) { create(:line, :network => network, :company => company) }.paginate }
diff --git a/spec/views/lines/new.html.erb_spec.rb b/spec/views/lines/new.html.erb_spec.rb
index 7433162d1..cd436ffcf 100644
--- a/spec/views/lines/new.html.erb_spec.rb
+++ b/spec/views/lines/new.html.erb_spec.rb
@@ -1,7 +1,7 @@
require 'spec_helper'
describe "/lines/new" do
- let!(:referential) { assign(:referential, create(:referential)) }
+ assign_referential
let!(:network) { create(:network) }
let!(:company) { create(:company) }
let!(:line) { assign(:line, build(:line, :network => network, :company => company )) }
diff --git a/spec/views/lines/show.html.erb_spec.rb b/spec/views/lines/show.html.erb_spec.rb
index f77722672..5ef414c01 100644
--- a/spec/views/lines/show.html.erb_spec.rb
+++ b/spec/views/lines/show.html.erb_spec.rb
@@ -2,7 +2,7 @@ require 'spec_helper'
describe "/lines/show" do
- let!(:referential) { assign :referential, create(:referential) }
+ assign_referential
let!(:line) { assign :line, create(:line) }
let!(:routes) { assign :routes, Array.new(2) { create(:route, :line => line) }.paginate }
let!(:map) { assign(:map, mock(:to_html => '<div id="map"/>'.html_safe)) }
diff --git a/spec/views/networks/edit.html.erb_spec.rb b/spec/views/networks/edit.html.erb_spec.rb
index b8ea64288..2dab39089 100644
--- a/spec/views/networks/edit.html.erb_spec.rb
+++ b/spec/views/networks/edit.html.erb_spec.rb
@@ -1,7 +1,7 @@
require 'spec_helper'
describe "/networks/edit" do
- let!(:referential) { assign(:referential, create(:referential)) }
+ assign_referential
let!(:network) { assign(:network, create(:network) ) }
describe "test" do
diff --git a/spec/views/networks/index.html.erb_spec.rb b/spec/views/networks/index.html.erb_spec.rb
index 6e20c2c46..7e0c24fa5 100644
--- a/spec/views/networks/index.html.erb_spec.rb
+++ b/spec/views/networks/index.html.erb_spec.rb
@@ -2,7 +2,7 @@ require 'spec_helper'
describe "/networks/index" do
- let!(:referential) { assign :referential, create(:referential) }
+ assign_referential
let!(:networks) { assign :networks, Array.new(2){ create(:network) }.paginate }
let!(:search) { assign :q, Ransack::Search.new(Chouette::Network) }
diff --git a/spec/views/networks/new.html.erb_spec.rb b/spec/views/networks/new.html.erb_spec.rb
index 4a2551fcd..8299fdb0d 100644
--- a/spec/views/networks/new.html.erb_spec.rb
+++ b/spec/views/networks/new.html.erb_spec.rb
@@ -1,7 +1,7 @@
require 'spec_helper'
describe "/networks/new" do
- let!(:referential) { assign(:referential, create(:referential)) }
+ assign_referential
let!(:network) { assign(:network, build(:network)) }
describe "form" do
diff --git a/spec/views/networks/show.html.erb_spec.rb b/spec/views/networks/show.html.erb_spec.rb
index 08ecdd95d..a3aab1d9e 100644
--- a/spec/views/networks/show.html.erb_spec.rb
+++ b/spec/views/networks/show.html.erb_spec.rb
@@ -2,7 +2,7 @@ require 'spec_helper'
describe "/networks/show" do
- let!(:referential) { assign(:referential, create(:referential)) }
+ assign_referential
let!(:network) { assign(:network, create(:network)) }
let!(:map) { assign(:map, mock(:to_html => '<div id="map"/>'.html_safe)) }
diff --git a/spec/views/referentials/new.html.erb_spec.rb b/spec/views/referentials/new.html.erb_spec.rb
index dccd990cb..05766ad50 100644
--- a/spec/views/referentials/new.html.erb_spec.rb
+++ b/spec/views/referentials/new.html.erb_spec.rb
@@ -2,7 +2,7 @@ require 'spec_helper'
describe "referentials/new.html.erb" do
- let!(:referential) { assign(:referential, Referential.new) }
+ assign_referential
it "should have a textfield for name" do
render
diff --git a/spec/views/referentials/show.html.erb_spec.rb b/spec/views/referentials/show.html.erb_spec.rb
index 70518a270..e7f5427c2 100644
--- a/spec/views/referentials/show.html.erb_spec.rb
+++ b/spec/views/referentials/show.html.erb_spec.rb
@@ -1,7 +1,7 @@
require 'spec_helper'
describe "referentials/show.html.erb" do
- let!(:referential) { assign(:referential, create(:referential)) }
+ assign_referential
it "should have a title with name" do
render
diff --git a/spec/views/routes/show.html.erb_spec.rb b/spec/views/routes/show.html.erb_spec.rb
index 2f39adb9a..983b63fcb 100644
--- a/spec/views/routes/show.html.erb_spec.rb
+++ b/spec/views/routes/show.html.erb_spec.rb
@@ -2,7 +2,7 @@ require 'spec_helper'
describe "/routes/show" do
- let!(:referential) { assign :referential, create(:referential) }
+ assign_referential
let!(:line) { assign :line, create(:line) }
let!(:route) { assign :route, create(:route, :line => line) }
let!(:stop_points) { assign :stop_points, Array.new(2) { create(:stop_point) }.paginate }
diff --git a/spec/views/stop_areas/edit.html.erb_spec.rb b/spec/views/stop_areas/edit.html.erb_spec.rb
index 17e9ca104..5d3dac112 100644
--- a/spec/views/stop_areas/edit.html.erb_spec.rb
+++ b/spec/views/stop_areas/edit.html.erb_spec.rb
@@ -1,7 +1,7 @@
require 'spec_helper'
describe "/stop_areas/edit" do
- let!(:referential) { assign(:referential, create(:referential)) }
+ assign_referential
let!(:stop_area) { assign(:stop_area, create(:stop_area)) }
let!(:map) { assign(:map, mock(:to_html => '<div id="map"/>'.html_safe)) }
diff --git a/spec/views/stop_areas/index.html.erb_spec.rb b/spec/views/stop_areas/index.html.erb_spec.rb
index 3adecdd0d..d758304a2 100644
--- a/spec/views/stop_areas/index.html.erb_spec.rb
+++ b/spec/views/stop_areas/index.html.erb_spec.rb
@@ -2,7 +2,7 @@ require 'spec_helper'
describe "/stop_areas/index" do
- let!(:referential) { assign :referential, create(:referential) }
+ assign_referential
let!(:stop_areas) { assign :stop_areas, Array.new(2) { create(:stop_area) }.paginate }
let!(:q) { assign :q, Ransack::Search.new(Chouette::StopArea) }
diff --git a/spec/views/stop_areas/new.html.erb_spec.rb b/spec/views/stop_areas/new.html.erb_spec.rb
index be1b7593b..7366a9dc5 100644
--- a/spec/views/stop_areas/new.html.erb_spec.rb
+++ b/spec/views/stop_areas/new.html.erb_spec.rb
@@ -1,7 +1,7 @@
require 'spec_helper'
describe "/stop_areas/new" do
- let!(:referential) { assign(:referential, create(:referential)) }
+ assign_referential
let!(:stop_area) { assign(:stop_area, build(:stop_area)) }
describe "form" do
diff --git a/spec/views/stop_areas/show.html.erb_spec.rb b/spec/views/stop_areas/show.html.erb_spec.rb
index b4be2c5e0..19e3d9de0 100644
--- a/spec/views/stop_areas/show.html.erb_spec.rb
+++ b/spec/views/stop_areas/show.html.erb_spec.rb
@@ -2,7 +2,7 @@ require 'spec_helper'
describe "/stop_areas/show" do
- let!(:referential) { assign :referential, create(:referential) }
+ assign_referential
let!(:stop_area) { assign :stop_area, create(:stop_area) }
let!(:map) { assign(:map, mock(:to_html => '<div id="map"/>'.html_safe)) }
diff --git a/spec/views/time_tables/edit.html.erb_spec.rb b/spec/views/time_tables/edit.html.erb_spec.rb
index 6baf741fc..9c3cc485c 100644
--- a/spec/views/time_tables/edit.html.erb_spec.rb
+++ b/spec/views/time_tables/edit.html.erb_spec.rb
@@ -1,7 +1,7 @@
require 'spec_helper'
describe "/time_tables/edit" do
- let!(:referential) { assign(:referential, create(:referential)) }
+ assign_referential
let!(:time_table) { assign(:time_table, create(:time_table) ) }
describe "test" do
diff --git a/spec/views/time_tables/index.html.erb_spec.rb b/spec/views/time_tables/index.html.erb_spec.rb
index 7d56ad982..b8f1cb6d3 100644
--- a/spec/views/time_tables/index.html.erb_spec.rb
+++ b/spec/views/time_tables/index.html.erb_spec.rb
@@ -2,7 +2,7 @@ require 'spec_helper'
describe "/time_tables/index" do
- let!(:referential) { assign :referential, create(:referential) }
+ assign_referential
let!(:time_tables) { assign :time_tables, Array.new(2){ create(:time_table) }.paginate }
let!(:search) { assign :q, Ransack::Search.new(Chouette::TimeTable) }
diff --git a/spec/views/time_tables/new.html.erb_spec.rb b/spec/views/time_tables/new.html.erb_spec.rb
index dd7a35b3b..6ec28add3 100644
--- a/spec/views/time_tables/new.html.erb_spec.rb
+++ b/spec/views/time_tables/new.html.erb_spec.rb
@@ -1,7 +1,7 @@
require 'spec_helper'
describe "/time_tables/new" do
- let!(:referential) { assign(:referential, create(:referential)) }
+ assign_referential
let!(:time_table) { assign(:time_table, build(:time_table)) }
describe "form" do
diff --git a/spec/views/time_tables/show.html.erb_spec.rb b/spec/views/time_tables/show.html.erb_spec.rb
index 056919b2b..17449748b 100644
--- a/spec/views/time_tables/show.html.erb_spec.rb
+++ b/spec/views/time_tables/show.html.erb_spec.rb
@@ -2,7 +2,7 @@ require 'spec_helper'
describe "/time_tables/show" do
- let!(:referential) { assign(:referential, create(:referential)) }
+ assign_referential
let!(:time_table) { assign(:time_table, create(:time_table)) }
it "should render h2 with the time_table comment" do
diff --git a/spec/views/vehicle_journeys/_form.html.erb_spec.rb b/spec/views/vehicle_journeys/_form.html.erb_spec.rb
index e55867bca..9cbeb76b0 100644
--- a/spec/views/vehicle_journeys/_form.html.erb_spec.rb
+++ b/spec/views/vehicle_journeys/_form.html.erb_spec.rb
@@ -2,7 +2,7 @@ require 'spec_helper'
describe "/vehicle_journeys/_form" do
- let!(:referential) { assign :referential, create(:referential) }
+ assign_referential
let!(:line) { assign :line, create(:line) }
let!(:route) { assign :route, create(:route, :line => line) }
let!(:vehicle_journey) { assign :vehicle_journey, create(:vehicle_journey, :route => route) }
diff --git a/spec/views/vehicle_journeys/_vehicle_journey_at_stop_fields.html.erb_spec.rb b/spec/views/vehicle_journeys/_vehicle_journey_at_stop_fields.html.erb_spec.rb
index f99d27119..e5ee0d635 100644
--- a/spec/views/vehicle_journeys/_vehicle_journey_at_stop_fields.html.erb_spec.rb
+++ b/spec/views/vehicle_journeys/_vehicle_journey_at_stop_fields.html.erb_spec.rb
@@ -2,7 +2,7 @@ require 'spec_helper'
describe "/vehicle_journeys/_vehicle_journey_at_stop_fields" do
- let!(:referential) { assign :referential, create(:referential) }
+ assign_referential
let!(:line) { assign :line, create(:line) }
let!(:route) { assign :route, create(:route, :line => line) }
let!(:vehicle_journey) { assign :vehicle_journey, create(:vehicle_journey, :route => route) }
diff --git a/spec/views/vehicle_journeys/edit.html.erb_spec.rb b/spec/views/vehicle_journeys/edit.html.erb_spec.rb
index 7d69f3ec1..a3eb871e2 100644
--- a/spec/views/vehicle_journeys/edit.html.erb_spec.rb
+++ b/spec/views/vehicle_journeys/edit.html.erb_spec.rb
@@ -2,7 +2,7 @@ require 'spec_helper'
describe "/vehicle_journeys/edit" do
- let!(:referential) { assign :referential, create(:referential) }
+ assign_referential
let!(:line) { assign :line, create(:line) }
let!(:route) { assign :route, create(:route, :line => line) }
let!(:vehicle_journey) { assign :vehicle_journey, create(:vehicle_journey, :route => route) }
diff --git a/spec/views/vehicle_journeys/new.html.erb_spec.rb b/spec/views/vehicle_journeys/new.html.erb_spec.rb
index 152c48e46..495b667bd 100644
--- a/spec/views/vehicle_journeys/new.html.erb_spec.rb
+++ b/spec/views/vehicle_journeys/new.html.erb_spec.rb
@@ -2,7 +2,7 @@ require 'spec_helper'
describe "/vehicle_journeys/new" do
- let!(:referential) { assign :referential, create(:referential) }
+ assign_referential
let!(:line) { assign :line, create(:line) }
let!(:route) { assign :route, create(:route, :line => line) }
let!(:vehicle_journey) { assign :vehicle_journey, build(:vehicle_journey, :route => route) }