Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Rails Engines & RSpec
Search
Amanda
January 21, 2016
Technology
0
220
Rails Engines & RSpec
Amanda
January 21, 2016
Tweet
Share
More Decks by Amanda
See All by Amanda
Lessons Learned From an Elixir OTP Project
amandasposito
2
69
Aprendizados de um projeto Elixir OTP
amandasposito
4
580
SOLID - Dependency inversion principle
amandasposito
0
76
Como concorrência funciona em Elixir?
amandasposito
1
220
Programação Funcional & Elixir
amandasposito
3
120
Ecto, você sabe o que é ?
amandasposito
4
240
Novidades no Rails 5
amandasposito
0
97
Elixir e Phoenix
amandasposito
3
570
Elixir em 5 minutos
amandasposito
1
91
Other Decks in Technology
See All in Technology
CDKの魔法を少し解いてみる ― synth・build・diffで覗くIaCの裏側 ―
takahumi27
1
110
内部品質・フロー効率・コミュニケーションコストを悪化させ現場を苦しめかねない16の組織設計アンチパターン[超簡易版] / 16 Organization Design Anti-Patterns for Software Development
mtx2s
2
190
エンタープライズ企業における開発効率化のためのコンテキスト設計とその活用
sergicalsix
1
320
今日から使える AWS Step Functions 小技集 / AWS Step Functions Tips
kinunori
7
650
ソフトウェアエンジニアとデータエンジニアの違い・キャリアチェンジ
mtpooh
1
740
Logik: A Free and Open-source FPGA Toolchain
omasanori
0
280
"おまじない"はもう卒業! デバッガで探るSpring Bootの裏側と「学び方」の学び方
takeuchi_132917
0
110
エンジニアにとってコードと並んで重要な「データ」のお話 - データが動くとコードが見える:関数型=データフロー入門
ismk
0
460
Pythonで構築する全国市町村ナレッジグラフ: GraphRAGを用いた意味的地域検索への応用
negi111111
8
3.4k
Lazy Constant - finalフィールドの遅延初期化
skrb
0
120
こんな時代だからこそ! 想定しておきたいアクセスキー漏洩後のムーブ
takuyay0ne
4
530
Copilotの精度を上げる!カスタムプロンプト入門.pdf
ismk
10
3.3k
Featured
See All Featured
Building Flexible Design Systems
yeseniaperezcruz
329
39k
Being A Developer After 40
akosma
91
590k
Visualization
eitanlees
150
16k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
127
54k
A Tale of Four Properties
chriscoyier
161
23k
Navigating Team Friction
lara
190
15k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.5k
How to train your dragon (web standard)
notwaldorf
97
6.4k
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
jQuery: Nuts, Bolts and Bling
dougneiner
65
8k
How To Stay Up To Date on Web Technology
chriscoyier
791
250k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
54k
Transcript
Rails Engines e RSpec
“Engines can be considered miniature applications that provide functionality to
their host applications. “ http://guides.rubyonrails.org/engines.html
Ruby Gem + MVC “A Rails application is actually just
a ‘supercharged’ engine”
None
É uma maneira de organizar e compartilhar código reutilizável através
de uma ou mais aplicações.
Core Modulo Financeiro Modulo Logística
Redundância Melhor manutenção
Trade-offs
Criando uma Rails Engine do Zero
Nome da nossa engine Sem os arquivos do Test::Unit Plugin
isolado por namespace Cria com uma estrutura padrão com a dummy application especificada
Dummy Application Quando geramos a engine, a partir da linha
de comando, existe uma pequena aplicação dentro do diretório de testes.
None
Ela existe básicamente por que não existe um jeito de
se testar uma Rails Engine fora de uma aplicação Rails
.gemspec
As dependências devem ser adicionadas nesse arquivo para evitar conflitos
na hora de plugar a engine
None
rails generate rspec:install
Obrigada!
Referências https://medium.com/@amandasposito/rails-engines-e-rspec-6e7a8645dc5b#.nemad0vpz http://rspec.info/ http://guides.rubyonrails.org/engines.html https://www.bignerdranch.com/blog/intro-to-rails-engines/ http://stackoverflow.com/questions/6118905/rails-3-1-engine-vs-mountable-app