Skip to content

Commit 5a649b3

Browse files
committed
adjusting specs
1 parent 6bfa2e1 commit 5a649b3

File tree

3 files changed

+24
-24
lines changed

3 files changed

+24
-24
lines changed

spec/dummy/config/application.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
module Dummy
99
class Application < Rails::Application
1010
# Initialize configuration defaults for originally generated Rails version.
11-
config.load_defaults 6.1
11+
config.load_defaults 7.0
1212

1313
# Settings in config/environments/* take precedence over those specified here.
1414
# Application configuration can go into files in config/initializers

spec/test/components/card_spec.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,11 @@
4949
it 'has an image above the body text' do
5050
matestack_render do
5151
bs_card title: "Card title", body: "Some quick example text",
52-
img_path: asset_path("matestack-teaser.png")
52+
img_path: image_url("https://picsum.photos/200/300"), style: "width: 18rem;"
5353
end
5454
visit example_path
5555
expect(page).to have_selector('img.card-img-top')
56-
expect(page).to have_selector("img[src*='matestack-teaser']")
56+
expect(page).to have_selector("img[src*='https://picsum.photos/200/300']")
5757
end
5858

5959
it 'has only custom body component' do
@@ -84,7 +84,7 @@
8484
end
8585
matestack_render do
8686
bs_card slots: {
87-
body: method(:body_slot)
87+
body: method(:body_slot)
8888
}
8989
end
9090
visit example_path

spec/test/components/carousel_spec.rb

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
it 'renders a carousel with slides' do
77
matestack_render do
88
items = [
9-
{ path: asset_path("matestack-teaser.png") },
10-
{ path: asset_path("matestack-teaser.png") }
9+
{ path: image_url("https://picsum.photos/200/300") },
10+
{ path: image_url("https://picsum.photos/200/300") }
1111
]
1212
bs_carousel items: items
1313
end
@@ -24,8 +24,8 @@
2424
it 'renders a carousel with slides in dark variant' do
2525
matestack_render do
2626
items = [
27-
{ path: asset_path("matestack-teaser.png") },
28-
{ path: asset_path("matestack-teaser.png") }
27+
{ path: image_url("https://picsum.photos/200/300") },
28+
{ path: image_url("https://picsum.photos/200/300") }
2929
]
3030
bs_carousel items: items, variant: :dark
3131
end
@@ -36,8 +36,8 @@
3636
it 'can have caption on carousel' do
3737
matestack_render do
3838
items = [
39-
{ path: asset_path("matestack-teaser.png"), title: "First slide", text: "Carousel First Text Caption" },
40-
{ path: asset_path("matestack-teaser.png"), title: "Second slide", text: "Carousel Second Text Caption" }
39+
{ path: image_url("https://picsum.photos/200/300"), title: "First slide", text: "Carousel First Text Caption" },
40+
{ path: image_url("https://picsum.photos/200/300"), title: "Second slide", text: "Carousel Second Text Caption" }
4141
]
4242
bs_carousel items: items
4343
end
@@ -52,8 +52,8 @@
5252
it 'renders a carousel with faded animation and start at 2nd item' do
5353
matestack_render do
5454
items = [
55-
{ path: asset_path("matestack-teaser.png"), title: "First slide", text: "Carousel First Text Caption" },
56-
{ path: asset_path("matestack-teaser.png"), title: "Second slide", text: "Carousel Second Text Caption" }
55+
{ path: image_url("https://picsum.photos/200/300"), title: "First slide", text: "Carousel First Text Caption" },
56+
{ path: image_url("https://picsum.photos/200/300"), title: "Second slide", text: "Carousel Second Text Caption" }
5757
]
5858
bs_carousel fade: true, start: 1, items: items
5959
end
@@ -70,8 +70,8 @@
7070
fail
7171
matestack_render do
7272
items = [
73-
{ path: asset_path("matestack-teaser.png"), title: "First slide", interval: 2000 },
74-
{ path: asset_path("matestack-teaser.png"), title: "Second slide", interval: 3000 }
73+
{ path: image_url("https://picsum.photos/200/300"), title: "First slide", interval: 2000 },
74+
{ path: image_url("https://picsum.photos/200/300"), title: "Second slide", interval: 3000 }
7575
]
7676
bs_carousel items: items
7777
end
@@ -91,8 +91,8 @@
9191
it 'renders a carousel with indicators, controls' do
9292
matestack_render do
9393
items = [
94-
{ path: asset_path("matestack-teaser.png") },
95-
{ path: asset_path("matestack-teaser.png") }
94+
{ path: image_url("https://picsum.photos/200/300") },
95+
{ path: image_url("https://picsum.photos/200/300") }
9696
]
9797
bs_carousel controls: true, indicators: true, items: items, variant: :dark
9898
end
@@ -107,8 +107,8 @@
107107
it 'can show next item on event' do
108108
matestack_render do
109109
items = [
110-
{ path: asset_path("matestack-teaser.png"), title: "First slide", interval: 10000, title_class: 'text-dark' },
111-
{ path: asset_path("matestack-teaser.png"), title: "Second slide", interval: 10000, title_class: 'text-dark' }
110+
{ path: image_url("https://picsum.photos/200/300"), title: "First slide", interval: 10000, title_class: 'text-dark' },
111+
{ path: image_url("https://picsum.photos/200/300"), title: "Second slide", interval: 10000, title_class: 'text-dark' }
112112
]
113113
bs_carousel next_on: "next-carousel", pause_on: "pause", items: items, style: "width: 1000px"
114114
end
@@ -130,8 +130,8 @@
130130
it 'can show previous item on event' do
131131
matestack_render do
132132
items = [
133-
{ path: asset_path("matestack-teaser.png"), title: "First slide" },
134-
{ path: asset_path("matestack-teaser.png"), title: "Second slide" }
133+
{ path: image_url("https://picsum.photos/200/300"), title: "First slide" },
134+
{ path: image_url("https://picsum.photos/200/300"), title: "Second slide" }
135135
]
136136
bs_carousel prev_on: "prev-carousel", items: items
137137
end
@@ -150,8 +150,8 @@
150150
it 'can pause on event and restarty cycling after event' do
151151
matestack_render do
152152
items = [
153-
{ path: asset_path("matestack-teaser.png"), title: "First slide", title_class: 'text-dark' },
154-
{ path: asset_path("matestack-teaser.png"), title: "Second slide", title_class: 'text-dark' }
153+
{ path: image_url("https://picsum.photos/200/300"), title: "First slide", title_class: 'text-dark' },
154+
{ path: image_url("https://picsum.photos/200/300"), title: "Second slide", title_class: 'text-dark' }
155155
]
156156
bs_carousel cycle_on: "cycle-carousel", pause_on: "pause-carousel", items: items, interval: 500, style: "width: 300px"
157157
end
@@ -181,8 +181,8 @@
181181

182182
# matestack_render do
183183
# items = [
184-
# { path: asset_path("matestack-teaser.png"), title: "First slide" },
185-
# { path: asset_path("matestack-teaser.png"), title: "Second slide" }
184+
# { path: image_url("https://picsum.photos/200/300"), title: "First slide" },
185+
# { path: image_url("https://picsum.photos/200/300"), title: "Second slide" }
186186
# ]
187187
# carousel items: items
188188
# end

0 commit comments

Comments
 (0)